<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>PHP</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/PHP"> <link href="./_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-PHP rootpage-PHP skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">PHP</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr">
<p class="mw-empty-elt">
</p>
<table class="infobox_v2 infobox infobox--frwiki noarchive">
<tbody><tr>
<td colspan="2" class="entete informatique" style="background-color:#787cb4;color:black;"><span style="color: #fff;">PHP</span><style data-mw-deduplicate="TemplateStyles:r228712691">
/* start https://fr.wikipedia.org/ */
.mw-parser-output .entete.informatique{background-image:url("./_mw_/Picto.nfo.png")}
/* end https://fr.wikipedia.org/ */
</style>
</td></tr>
<tr><td colspan="3" style="text-align:center; line-height: 1.5em;"> </td></tr>
<tr>
<td colspan="3" style="text-align:center; line-height: 1.5em;"> </td></tr>
<tr>
<td colspan="2"><hr style="height:2px; color:inherit; background-color:#787cb4;"></td></tr>
<tr>
<th scope="row">Date de première version
</th>
<td><a href="1995" title="1995">1995</a><sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</td>
</tr>
<tr>
<th scope="row"><a href="Paradigme_(programmation)" title="Paradigme (programmation)">Paradigmes</a>
</th>
<td><a href="Programmation_imp%C3%A9rative" title="Programmation impérative">Impératif</a>, <a href="Programmation_orient%C3%A9e_objet" title="Programmation orientée objet">orienté objet</a>, <a href="Programmation_fonctionnelle" title="Programmation fonctionnelle">fonctionnel</a>, <a href="Programmation_proc%C3%A9durale" title="Programmation procédurale">procédural</a>, <a href="R%C3%A9flexion_(informatique)" title="Réflexion (informatique)">réflexif</a> et <a href="Langage_de_script" title="Langage de script">interprété</a>
</td>
</tr>
<tr>
<th scope="row">Auteur
</th>
<td><a href="Rasmus_Lerdorf" title="Rasmus Lerdorf">Rasmus Lerdorf</a>
</td>
</tr>
<tr>
<th scope="row">Développeurs
</th>
<td><span class="url"><a rel="nofollow" class="external text" href="https://www.php.net/credits.php">The PHP Group</a></span>, <a href="Zend_Technologies" title="Zend Technologies">Zend Technologies</a>, <span class="url"><a rel="nofollow" class="external text" href="https://thephp.foundation/">PHP Foundation</a></span>
</td>
</tr>
<tr>
<th scope="row"><a href="Version_d'un_logiciel" title="Version d'un logiciel">Dernière version</a>
</th>
<td><span class="wd_p348">8.4.14 (<time class="nowrap date-lien" datetime="2025-10-23" data-sort-value="2025-10-23"><a href="23_octobre" title="23 octobre">23</a> <a href="Octobre_2025" title="Octobre 2025">octobre</a> <a href="2025" title="2025">2025</a></time>)<sup id="cite_ref-wikidata-f31ec1485bac56f44715fc0211de219fb9680026_2-1" class="reference"><a href="#cite_note-wikidata-f31ec1485bac56f44715fc0211de219fb9680026-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup></span>
</td>
</tr>
<tr>
<th scope="row">Typage
</th>
<td><a href="Typage_dynamique" title="Typage dynamique">Dynamique</a>, <a href="Typage_faible" class="mw-redirect" title="Typage faible">Faible</a>
</td>
</tr>
<tr>
<th scope="row">Influencé par
</th>
<td><a href="C_(langage)" title="C (langage)">C</a>, <a href="C%2B%2B" title="C++">C++</a>, <a href="Java_(langage)" title="Java (langage)">Java</a>, <a href="Perl_(langage)" title="Perl (langage)">Perl</a><sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</td>
</tr>
<tr>
<th scope="row">Implémentations
</th>
<td><a href="Zend_Engine" title="Zend Engine">Zend Engine</a>
</td>
</tr>
<tr>
<th scope="row"><a href="Langage_de_programmation" title="Langage de programmation">Écrit en</a>
</th>
<td><a href="C_(langage)" title="C (langage)">C</a>
</td>
</tr>
<tr>
<th scope="row"><a href="Syst%C3%A8me_d'exploitation" title="Système d'exploitation">Système d'exploitation</a>
</th>
<td><a href="Logiciel_multiplate-forme" class="mw-redirect" title="Logiciel multiplate-forme">Multi-plateforme</a>
</td>
</tr>
<tr>
<th scope="row"><a href="Licence_de_logiciel" title="Licence de logiciel">Licence</a>
</th>
<td><a href="Licence_libre" title="Licence libre">Licence libre</a> : <a href="Licence_PHP" title="Licence PHP">Licence PHP</a><sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</td>
</tr>
<tr>
<th scope="row"><a href="Site_web" title="Site web">Site web</a>
</th>
<td><a rel="nofollow" class="external free" href="https://www.php.net/">https://www.php.net/</a>
</td>
</tr>
<tr>
<th scope="row"><a href="Extension_de_nom_de_fichier" title="Extension de nom de fichier">Extensions de fichiers</a>
</th>
<td>.php, .phar, .phtml, .pht, .phps
</td>
</tr>
<tr>
</tr>
</tbody></table>
<p><i><dfn lang="en">PHP: Hypertext Preprocessor</dfn></i><sup id="cite_ref-manpreface_5-0" class="reference"><a href="#cite_note-manpreface-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>, plus connu sous son sigle <dfn>PHP</dfn> (<a href="Sigles_auto-r%C3%A9f%C3%A9rentiels" class="mw-redirect" title="Sigles auto-référentiels">sigle auto-référentiel</a>), est un <a href="Langage_de_programmation" title="Langage de programmation">langage de programmation</a> <a href="Logiciel_libre" title="Logiciel libre">libre</a><sup id="cite_ref-fsfphplicense_6-0" class="reference"><a href="#cite_note-fsfphplicense-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>, développé le <a href="8_juin" title="8 juin">8 juin 1995</a> principalement utilisé pour produire des <a href="Page_Web_dynamique" class="mw-redirect" title="Page Web dynamique">pages Web dynamiques</a> via un <a href="Serveur_web" title="Serveur web">serveur web</a><sup id="cite_ref-manpreface_5-1" class="reference"><a href="#cite_note-manpreface-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>, mais pouvant également fonctionner comme n'importe quel <a href="Langage_interpr%C3%A9t%C3%A9_(informatique)" class="mw-redirect" title="Langage interprété (informatique)">langage interprété</a> de façon locale. PHP est un <a href="Programmation_imp%C3%A9rative" title="Programmation impérative">langage impératif</a> <a href="Orient%C3%A9_objet" class="mw-redirect" title="Orienté objet">orienté objet</a>.
</p><p>PHP a permis de créer un grand nombre de sites web célèbres, comme <a href="Facebook" title="Facebook">Facebook</a> et <a href="Wikip%C3%A9dia" title="Wikipédia">Wikipédia</a><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>. Il est considéré comme une des bases de la création de sites web dits <a href="Page_web_dynamique" title="Page web dynamique">dynamiques</a> mais également des <a href="Application_web" title="Application web">applications web</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Présentation"><span id="Pr.C3.A9sentation"></span>Présentation</h2></div>
<p>PHP est un <a href="Langage_serveur" title="Langage serveur">langage de script utilisé le plus souvent côté serveur</a> : dans cette architecture, le <a href="Serveur_Web" class="mw-redirect" title="Serveur Web">serveur</a> interprète le code PHP des pages web demandées et génère du code (<a href="Hypertext_Markup_Language" title="Hypertext Markup Language">HTML</a>, <a href="XHTML" class="mw-redirect" title="XHTML">XHTML</a>, <a href="Feuilles_de_style_en_cascade" title="Feuilles de style en cascade">CSS</a> par exemple) et des données (<a href="JPEG" title="JPEG">JPEG</a>, <a href="Graphics_Interchange_Format" title="Graphics Interchange Format">GIF</a>, <a href="Portable_Network_Graphics" title="Portable Network Graphics">PNG</a> par exemple) pouvant être <a href="Interpr%C3%A8te_(informatique)" title="Interprète (informatique)">interprétés</a> et <a href="Moteur_de_rendu_HTML" class="mw-redirect" title="Moteur de rendu HTML">rendus</a> par un <a href="Navigateur_web" title="Navigateur web">navigateur web</a>. PHP peut également générer d'autres formats comme le <a href="Wireless_Markup_Language" title="Wireless Markup Language">WML</a>, le <a href="Scalable_Vector_Graphics" title="Scalable Vector Graphics">SVG</a> et le <a href="Portable_Document_Format" title="Portable Document Format">PDF</a>.
</p><p>Il a été conçu pour permettre la création d'applications dynamiques, le plus souvent développées pour le <a href="Web" class="mw-redirect" title="Web">Web</a>. PHP est le plus souvent <a href="#Plateformes">couplé</a> à un serveur <a href="Apache_HTTP_Server" title="Apache HTTP Server">Apache</a> bien qu'il puisse être installé sur la plupart des <a href="Serveur_HTTP" class="mw-redirect" title="Serveur HTTP">serveurs HTTP</a> tels que <a href="Internet_Information_Services" title="Internet Information Services">IIS</a> ou <a href="NGINX" title="NGINX">nginx</a>. Ce couplage permet de récupérer des informations issues d'une <a href="Base_de_donn%C3%A9es" title="Base de données">base de données</a>, d'un <a href="Syst%C3%A8me_de_fichiers" title="Système de fichiers">système de fichiers</a> (contenu de fichiers et de l'arborescence) ou plus simplement des données envoyées par le <a href="Navigateur_web" title="Navigateur web">navigateur</a> afin d'être interprétées ou stockées pour une utilisation ultérieure.
</p><p>C'est un langage peu <a href="Type_(informatique)" title="Type (informatique)">typé</a> et souple et donc facile à apprendre par un débutant mais, de ce fait, des bugs et des <a href="Vuln%C3%A9rabilit%C3%A9_(informatique)" title="Vulnérabilité (informatique)">failles de sécurité</a> peuvent rapidement apparaître dans les applications. Pragmatique, PHP ne s'encombre pas de théorie et a tendance à choisir le chemin le plus direct. Néanmoins, le <a href="Convention_de_nommage" title="Convention de nommage">nom des fonctions</a> (ainsi que le passage des arguments) ne respecte pas une logique uniforme, ce qui peut être préjudiciable à l'apprentissage.
</p><p>Son utilisation commence avec le traitement des formulaires puis par l'accès aux <a href="Base_de_donn%C3%A9es" title="Base de données">bases de données</a>. L'accès aux bases de données est aisé une fois l'installation des modules correspondants effectuée sur le serveur. La force la plus évidente de ce langage est qu'il a permis au fil du temps la résolution aisée de problèmes autrefois compliqués et est devenu par conséquent un composant incontournable des offres d'hébergements.
</p><p>Il est <a href="Logiciel_multiplate-forme" class="mw-redirect" title="Logiciel multiplate-forme">multi-plateforme</a> : autant sur <a href="Linux" title="Linux">Linux</a> qu'avec <a href="Microsoft_Windows" title="Microsoft Windows">Windows</a> il permet aisément de reconduire le même <a href="Code_source" title="Code source">code</a> sur un environnement à peu près semblable (quoiqu'il faille prendre en compte les règles d'arborescences de répertoires, qui peuvent changer).
</p><p>Libre, gratuit, simple d'utilisation et d'installation, ce langage nécessite néanmoins une connaissance aiguë des problèmes de sécurité qui lui sont liés.
</p><p>La version 5.3 a introduit de nombreuses fonctions nouvelles : les <a href="Espace_de_noms_(programmation)" title="Espace de noms (programmation)">espaces de noms</a> (Namespace) — un élément fondamental de l'élaboration d'<a href="Extension_(logiciel)" class="mw-redirect" title="Extension (logiciel)">extensions</a>, de <a href="Biblioth%C3%A8que_logicielle" title="Bibliothèque logicielle">bibliothèques</a> et de <a href="Framework" title="Framework">frameworks</a> structurés, les <a href="Fonction_anonyme" title="Fonction anonyme">fonctions anonymes</a>, les <a href="Fermeture_(informatique)" title="Fermeture (informatique)">fermetures</a>, etc.
</p><p>En 2018, près de 80 % des sites web utilisent le langage PHP sous ses différentes versions<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>.
</p><p>Le langage PHP fait l'objet, depuis plusieurs années maintenant, de rassemblements nationaux organisés par l'AFUP<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> (l'Association Française des Utilisateurs de PHP), où experts de la programmation et du milieu se retrouvent pour échanger autour du PHP et de ses développeurs. L'association organise ainsi deux évènements<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> majeurs : le « Forum PHP », habituellement en fin d'année, et les « AFUP Day », qui ont lieu au cours du premier semestre, simultanément dans plusieurs villes.
</p>
<div class="mw-heading mw-heading2"><h2 id="Histoire">Histoire</h2></div>
<p>Le langage PHP a été créé en <a href="1994" title="1994">1994</a> par <a href="Rasmus_Lerdorf" title="Rasmus Lerdorf">Rasmus Lerdorf</a> pour son <a href="Site_web" title="Site web">site web</a>. C'était à l'origine une <a href="Biblioth%C3%A8que_logicielle" title="Bibliothèque logicielle">bibliothèque logicielle</a> en <a href="C_(langage)" title="C (langage)">C</a><sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> dont il se servait pour conserver une trace des visiteurs qui venaient consulter son <a href="Curriculum_vit%C3%A6" title="Curriculum vitæ">CV</a>. Au fur et à mesure qu'il ajoutait de nouvelles fonctionnalités, Rasmus a transformé la bibliothèque en une implémentation capable de communiquer avec des <a href="Base_de_donn%C3%A9es" title="Base de données">bases de données</a> et de créer des applications dynamiques et simples pour le <a href="World_Wide_Web" title="World Wide Web">Web</a>. Rasmus a alors décidé, en <a href="1995" title="1995">1995</a>, de publier son code, pour que tout le monde puisse l'utiliser et en profiter<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>. PHP s'appelait alors PHP/FI (pour <i><b>P</b>ersonal <b>H</b>ome <b>P</b>age Tools/<b>F</b>orm <b>I</b>nterpreter</i>). En <a href="1997" title="1997">1997</a>, deux étudiants, <a href="Andi_Gutmans" title="Andi Gutmans">Andi Gutmans</a> et <a href="Zeev_Suraski" title="Zeev Suraski">Zeev Suraski</a>, ont redéveloppé le cœur de PHP/FI. Ce travail a abouti un an plus tard à la version 3 de PHP, devenu alors <i>PHP: Hypertext Preprocessor</i>. Peu de temps après, Andi Gutmans et Zeev Suraski ont commencé la réécriture du moteur interne de PHP. C’est ce nouveau moteur, appelé <i><a href="Zend_Engine" title="Zend Engine">Zend Engine</a></i> — le mot <i>Zend</i> est la contraction de <i><b>Ze</b>ev</i> et <i>A<b>nd</b>i</i> — qui a servi de base à la version 4 de PHP<sup id="cite_ref-histoirephp_13-0" class="reference"><a href="#cite_note-histoirephp-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Mascotte">Mascotte</h3></div>
<p>Comme de nombreux projets <a href="Open_Source" class="mw-redirect" title="Open Source">Open Source</a>, PHP possède une mascotte. Il s'agit de <i>l'elePHPant</i>, un <a href="%C3%89l%C3%A9phant" title="Éléphant">éléphant</a> bleu-violet avec le logo de PHP sur son flanc<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup>. Elle a été dessinée par Vincent Pontier en 1998 d'après une ressemblance des lettres "PHP" avec un éléphant lorsqu'on les regarde de coté<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>.
</p><p>Beaucoup de variations de cette mascotte ont été créées au fil du temps principalement sous forme d'images, mais aussi sous forme de peluches et divers goodies<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup>, cependant seul le design original de Vincent Pontier est considéré comme officiel par la communauté.
</p><p>Le site <span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais américain">(en-US)</abbr> « <a rel="nofollow" class="external text" href="https://afieldguidetoelephpants.net"><cite style="font-style:normal;" lang="en-us">A Field Guide to Elephpants</cite></a> »</span> recense tous les éléPHPants existants.
</p>
<div class="mw-heading mw-heading3"><h3 id="Utilisation">Utilisation</h3></div>
<p>En <a href="2002" title="2002">2002</a>, PHP est utilisé par plus de 8 millions de sites Web à travers le monde<sup id="cite_ref-netcraft2002-02_17-0" class="reference"><a href="#cite_note-netcraft2002-02-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup>, en <a href="2007" title="2007">2007</a> par plus de 20 millions<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> et en 2013 par plus de 244 millions<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup>.
</p><p>De plus, PHP est devenu le langage de <a href="Programmation_web#Programmation_web_côté_serveur" title="Programmation web">programmation web côté serveur</a> le plus utilisé depuis plusieurs années :
</p>
<table class="wikitable">
<tbody><tr>
<th>Année</th>
<th>Part de marché
</th></tr>
<tr>
<td>2010</td>
<td>75 %
</td></tr>
<tr>
<td>2013</td>
<td>75 %<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td>2016</td>
<td>82 %<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td>2022</td>
<td>78 %<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup>
</td></tr></tbody></table>
<p>Enfin en 2010, PHP est le langage dont les logiciels open source sont les plus utilisés dans les entreprises, avec 57 % de <a href="Taux_de_p%C3%A9n%C3%A9tration_du_march%C3%A9" title="Taux de pénétration du marché">taux de pénétration</a><sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Versions_Majeures">Versions Majeures</h3></div>
<p>Depuis <time class="nowrap" datetime="2011-06" data-sort-value="2011-06">juin 2011</time> et le nouveau processus de livraison de PHP<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>, le cycle de livraison de PHP se résume à une mise à jour annuelle comportant des changements fonctionnels importants.
La durée de vie d'une branche est de 3 ans, laissant trois branches stables et maintenues (cela signifie que lorsqu'une nouvelle version de PHP 5.x sort, la version 5.x-3 n'est plus supportée).
</p>
<div class="mw-heading mw-heading4"><h4 id="Version_8_(PHP_8)"><span id="Version_8_.28PHP_8.29"></span>Version 8 (PHP 8)</h4></div>
<p>Sortie le <time class="nowrap" datetime="2020-11-26" data-sort-value="2020-11-26">26 novembre 2020</time>, cette version majeure se démarque principalement par la fonctionnalité de « <a href="Compilation_%C3%A0_la_vol%C3%A9e" title="Compilation à la volée">compilation à la volée</a> » (<i>Just-in-time compilation</i><sup id="cite_ref-r1_25-0" class="reference"><a href="#cite_note-r1-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>) qui permet un gain de vitesse d'exécution de plus de 45 %<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> pour certaines applications Web. D'autres nouveautés sont également introduites comme :
</p>
<ul><li>la promotion des propriétés du constructeur<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup> ;</li>
<li>les weakmaps<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup> ;</li>
<li>la Stringable Interface<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup> ;</li>
<li>l'expression throw<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup>.</li></ul>
<div class="mw-heading mw-heading4"><h4 id="Version_7_(PHP_7)"><span id="Version_7_.28PHP_7.29"></span>Version 7 (PHP 7)</h4></div>
<p>Au vu des orientations différentes prises par le langage de celles prévues par PHP 6, une partie des développeurs propose de nommer la version succédant à PHP 5 « PHP 7 » au lieu de « PHP 6 ». Un vote parmi les développeurs valide cette proposition par 58 voix contre 24<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup>.
</p><p>PHP 7.0.0 est sorti en <time class="nowrap" datetime="2015-12" data-sort-value="2015-12">décembre 2015</time>.
</p><p>La nouvelle version propose une optimisation du code et, d'après la société Zend, offre des performances dépassant celles de <a href="Machine_virtuelle" title="Machine virtuelle">machines virtuelles</a> comme <a href="HHVM" class="mw-redirect" title="HHVM">HHVM</a><sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup><sup class="reference cite_virgule">,</sup><sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup>. Les <a href="Test_de_performance" title="Test de performance">benchmarks</a> externes montrent des performances similaires pour HHVM et PHP 7, avec un léger avantage d'HHVM dans la plupart des scénarios<sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup>.
</p>
<div class="mw-heading mw-heading4"><h4 id="PHP_6_et_Unicode">PHP 6 et Unicode</h4></div>
<p>En 2005, le projet de faire de PHP un langage fonctionnant d'origine en Unicode a été lancé par Andrei Zmievski, ceci en s'appuyant sur la bibliothèque <a href="International_Components_for_Unicode" title="International Components for Unicode">International Components for Unicode</a> (ICU) et en utilisant <a href="UTF-16" title="UTF-16">UTF-16</a> pour représenter les chaînes de caractères dans le moteur<sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup>.
</p><p>Étant donné que cela représentait un changement majeur tant dans le fonctionnement du langage que dans le code PHP créé par ses utilisateurs, il fut décidé d'intégrer cela dans une nouvelle version 6.0 avec d'autres fonctionnalités importantes alors en développement<sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup>. Toutefois, le manque de développeurs experts en Unicode ainsi que les problèmes de performance résultant de la conversion des chaînes de et vers UTF-16 (rarement utilisé dans un contexte web), ont conduit au report récurrent de la livraison de cette version<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup>. Par conséquent, une version 5.3 fut créée en 2009 intégrant de nombreuses fonctionnalités non liées à Unicode qui était initialement prévues pour la version 6.0, notamment le support des espaces de nommage (namespaces) et des fonctions anonymes. En <time class="nowrap" datetime="2010-03" data-sort-value="2010-03">mars 2010</time>, le projet 6.0 intégrant Unicode fut abandonné et la version 5.4 fut préparée afin d'intégrer la plupart des fonctionnalités non liées à l'Unicode encore dans la branche 6.0, telles que les traits ou l'extension des fermetures au modèle objet<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup>.
</p><p>Le projet est depuis passé à un cycle de livraison prévisible (annuel) contenant des avancées significatives mais contenues tout en préservant au maximum la rétro-compatibilité avec le code PHP existant (5.4 en 2012, 5.5 en 2013, 5.6 prévue pour l'été 2014). Depuis <time class="nowrap" datetime="2014-01" data-sort-value="2014-01">janvier 2014</time><sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup>, l'idée d'une nouvelle version majeure introduisant Unicode mais se basant sur <a href="UTF-8" title="UTF-8">UTF-8</a> (largement devenu depuis le standard du Web pour l'Unicode) et permettant certains changements pouvant casser la rétro-compatibilité avec du code PHP ancien est de nouveau discutée et les RFC sont maintenant triées selon leur implémentation en 5.x (évolutions ne causant pas ou marginalement de cassure de la rétro-compatibilité) ou dans la future version majeure (évolutions majeures du moteur et évolutions impliquant une non-compatibilité ascendante).
</p>
<div class="mw-heading mw-heading4"><h4 id="À_noter"><span id=".C3.80_noter"></span>À noter</h4></div>
<p>Il est à noter qu'historiquement, PHP disposait d'une configuration par défaut privilégiant la souplesse à la sécurité (par exemple register globals, qui a été activé par défaut jusqu'à PHP 4.2<sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup>). Cette souplesse a permis à de nombreux développeurs d'apprendre PHP mais le revers de la médaille a été que de nombreuses applications PHP étaient mal sécurisées. Le sujet a bien été pris en main par le PHPGroup qui a mis en place des configurations par défaut mettant l'accent sur la sécurité. Il en résultait une réputation de langage peu sécurisé, <span class="need_ref" title="Ce passage nécessite une référence." style="cursor:help;">réputation d'insécurité qui n'a plus de raison d'être</span><sup class="need_ref_tag" style="padding-left:2px;">[réf. nécessaire]</sup>.
</p>
<div class="mw-heading mw-heading4"><h4 id="Historique_des_versions">Historique des versions</h4></div>
<p>Un historique détaillé de toutes les versions de PHP est disponible sur <a rel="nofollow" class="external text" href="https://www.php.net/releases/">cette page</a>. Un tableau des versions supportées est aussi disponible sur le site officiel <a rel="nofollow" class="external text" href="https://www.php.net/supported-versions.php">ici</a>.
</p><p>Le tableau ci dessous référence les principales versions et les changements les plus notables.
</p>
<table class="wikitable sortable mw-collapsible mw-collapsed" style="width:100%">
<caption>Historique des versions
</caption>
<tbody><tr>
<th scope="col" data-sort-type="text">Version majeure
</th>
<th scope="col" data-sort-type="text">Version mineure
</th>
<th scope="col" data-sort-type="date">Date de sortie
</th>
<th>Date de fin de support<sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">[</span>41<span class="cite-bracket">]</span></a></sup>
</th>
<th scope="col" class="unsortable">Notes
</th></tr>
<tr>
<th>1
</th>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="1.0"><span style="display: none;">Ancienne version, plus prise en charge :</span> 1.0
</td>
<td><time class="nowrap" datetime="1995-06-08" data-sort-value="1995-06-08">8 juin 1995</time>
</td>
<td>
</td>
<td>Appelé officiellement « Personal Home Page Tools (PHP Tools) », outils pour page personnelle. C'est la première apparition du nom « PHP »<sup id="cite_ref-history_42-0" class="reference"><a href="#cite_note-history-42"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup>.
</td></tr>
<tr>
<th>2
</th>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="2.0"><span style="display: none;">Ancienne version, plus prise en charge :</span> 2.0
</td>
<td><time class="nowrap" datetime="1997-11-12" data-sort-value="1997-11-12">12 novembre 1997</time>
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<th>3
</th>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="3.0"><span style="display: none;">Ancienne version, plus prise en charge :</span> 3.0
</td>
<td><time class="nowrap" datetime="1998-06-06" data-sort-value="1998-06-06">6 juin 1998</time>
</td>
<td>20 octobre 2000
</td>
<td>Passage d'une personne à une équipe de développeurs. Zeev Suraski et Andi Gutmans réécrivent la base de cette version<sup id="cite_ref-history_42-1" class="reference"><a href="#cite_note-history-42"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup>.
</td></tr>
<tr>
<th rowspan="5">4
</th>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="4.0"><span style="display: none;">Ancienne version, plus prise en charge :</span> 4.0
</td>
<td><time class="nowrap" datetime="2000-05-22" data-sort-value="2000-05-22">22 mai 2000</time>
</td>
<td>23 juin 2001
</td>
<td>Ajout d'un système d'<a href="Analyse_syntaxique" title="Analyse syntaxique">analyse syntaxique</a> plus avancé appelé le Zend Engine. Ce moteur procède en deux étapes d'analyse puis d'exécution.
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="4.1"><span style="display: none;">Ancienne version, plus prise en charge :</span> 4.1
</td>
<td><time class="nowrap" datetime="2001-12-10" data-sort-value="2001-12-10">10 décembre 2001</time>
</td>
<td>12 mars 2002
</td>
<td>Introduit les <i>superglobals</i> (<code>$_GET</code>, <code>$_POST</code>, <code>$_SESSION</code>, etc.)
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="4.2"><span style="display: none;">Ancienne version, plus prise en charge :</span> 4.2
</td>
<td><time class="nowrap" datetime="2002-04-22" data-sort-value="2002-04-22">22 avril 2002</time>
</td>
<td>6 septembre 2002
</td>
<td>Désactive register_globals par défaut. Les données en provenance du réseau ne sont plus insérées directement dans l'espace de nom <a href="Variable_globale" title="Variable globale">global</a>, réduisant ainsi les possibilités de failles de sécurité
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="4.3"><span style="display: none;">Ancienne version, plus prise en charge :</span> 4.3
</td>
<td><time class="nowrap" datetime="2002-12-27" data-sort-value="2002-12-27">27 décembre 2002</time>
</td>
<td>31 mars 2005
</td>
<td>Introduit le <a href="Interface_en_ligne_de_commande" title="Interface en ligne de commande">CLI</a>, en addition au <a href="Common_Gateway_Interface" title="Common Gateway Interface">CGI</a>.
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="4.4"><span style="display: none;">Ancienne version, plus prise en charge :</span> 4.4
</td>
<td><time class="nowrap" datetime="2005-07-11" data-sort-value="2005-07-11">11 juillet 2005</time>
</td>
<td>7 août 2008
</td>
<td>Ajout du manuel (pages accessibles par la commande <code>man</code>) pour les scripts <code>phpize</code> et <code>php-config</code>.
</td></tr>
<tr>
<th rowspan="7">5
</th>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="5.0"><span style="display: none;">Ancienne version, plus prise en charge :</span> 5.0
</td>
<td><time class="nowrap" datetime="2004-07-13" data-sort-value="2004-07-13">13 juillet 2004</time>
</td>
<td>5 septembre 2005
</td>
<td>Zend Engine II avec un nouveau modèle objet<sup id="cite_ref-php5changelog_43-0" class="reference"><a href="#cite_note-php5changelog-43"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup>.
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="5.1"><span style="display: none;">Ancienne version, plus prise en charge :</span> 5.1
</td>
<td><time class="nowrap" datetime="2005-11-24" data-sort-value="2005-11-24">24 novembre 2005</time>
</td>
<td>24 août 2006
</td>
<td>Amélioration de performances par l'introduction de variables de compilation dans un moteur PHP repensé<sup id="cite_ref-php5changelog_43-1" class="reference"><a href="#cite_note-php5changelog-43"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup>.
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="5.2"><span style="display: none;">Ancienne version, plus prise en charge :</span> 5.2
</td>
<td><time class="nowrap" datetime="2006-11-02" data-sort-value="2006-11-02">2 novembre 2006</time>
</td>
<td>6 janvier 2011
</td>
<td>Activation par défaut de l'extension «filter»<sup id="cite_ref-php5changelog_43-2" class="reference"><a href="#cite_note-php5changelog-43"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup>.
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="5.3"><span style="display: none;">Ancienne version, plus prise en charge :</span> 5.3
</td>
<td><time class="nowrap" datetime="2009-06-30" data-sort-value="2009-06-30">30 juin 2009</time><sup id="cite_ref-44" class="reference"><a href="#cite_note-44"><span class="cite-bracket">[</span>44<span class="cite-bracket">]</span></a></sup>
</td>
<td>14 août 2014
</td>
<td>Support des <a href="Espace_de_noms_(programmation)" title="Espace de noms (programmation)">espaces de noms</a> ; Late Static Bindings (résolution statique à la volée) ; étiquettes de saut (<a href="Goto_(informatique)" title="Goto (informatique)">goto</a> limité) ; <a href="Fermeture_(informatique)" title="Fermeture (informatique)">fermetures</a> (closures) ; Native PHP archives (phar) ; <a href="Ramasse-miettes_(informatique)" title="Ramasse-miettes (informatique)">ramasse-miettes</a> de références cycliques ; connexion persistante avec <a href="MySQLi" title="MySQLi">MySQLi</a>, sqlite3 ; ajout de fileinfo en tant que remplacement de mime_magic pour un meilleur support de <a href="MIME" class="mw-redirect" title="MIME">MIME</a> ; raccourci pour l’opérateur ternaire (?:) ; <a href="Fonction_anonyme" title="Fonction anonyme">fonctions anonymes</a> ; nombreuses corrections de bogue<sup id="cite_ref-45" class="reference"><a href="#cite_note-45"><span class="cite-bracket">[</span>45<span class="cite-bracket">]</span></a></sup>...
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="5.4"><span style="display: none;">Ancienne version, plus prise en charge :</span> 5.4
</td>
<td><time class="nowrap" datetime="2012-03-01" data-sort-value="2012-03-01"><abbr class="abbr" title="premier">1<sup>er</sup></abbr> mars 2012</time>
</td>
<td>3 septembre 2015
</td>
<td>Support des <a href="Trait_(programmation)" title="Trait (programmation)">traits</a> ; syntaxe courte des tableaux introduite ; accès aux index de tableaux en sortie de fonctions ; les fermetures supportent $this ; <?= toujours disponible ; accès aux attributs d'un objet dès l'instanciation ; ajout syntaxe Class::{expr}() ; ajout format de nombres binaires ; suivi des envois de fichiers via l'extension de session ; serveur web embarqué en CLI<sup id="cite_ref-php.net_46-0" class="reference"><a href="#cite_note-php.net-46"><span class="cite-bracket">[</span>46<span class="cite-bracket">]</span></a></sup> dédié au développement ; support de <a href="Dtrace" class="mw-redirect" title="Dtrace">Dtrace</a> ; suppression des extensions <i>magic quotes</i>, <i>safe_mode</i>, <i>register_globals</i> et <i>register_long_array</i><sup id="cite_ref-php.net_46-1" class="reference"><a href="#cite_note-php.net-46"><span class="cite-bracket">[</span>46<span class="cite-bracket">]</span></a></sup>.
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="5.5"><span style="display: none;">Ancienne version, plus prise en charge :</span> 5.5
</td>
<td><time class="nowrap" datetime="2013-06-20" data-sort-value="2013-06-20">20 juin 2013</time>
</td>
<td>21 juillet 2016
</td>
<td>Support des <a href="G%C3%A9n%C3%A9rateur_(informatique)" title="Générateur (informatique)">générateurs</a> et des <a href="Coroutine" title="Coroutine">coroutines</a> ; ajout d'une <a href="Interface_de_programmation" title="Interface de programmation">API</a> de <a href="Fonction_de_hachage" title="Fonction de hachage">hachage</a> des mots de passe ; intégration en standard du système de <a href="M%C3%A9moire_cache" title="Mémoire cache">cache</a> Zend OPcache<sup id="cite_ref-47" class="reference"><a href="#cite_note-47"><span class="cite-bracket">[</span>47<span class="cite-bracket">]</span></a></sup> ; correction de nombreux bogues ; arrêt du support de <a href="Windows_XP" title="Windows XP">Windows XP</a> et <a href="Windows_Server_2003" title="Windows Server 2003">Windows Server 2003</a> ; mise à jour de la bibliothèque <a href="GD_(biblioth%C3%A8que)" title="GD (bibliothèque)">GD</a> ; les fonctions mysql_ sont maintenant considérées comme obsolètes (mise en avant de mysqli_ et de PDO_MySQL).
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="5.6"><span style="display: none;">Ancienne version, plus prise en charge :</span> 5.6
</td>
<td><time class="nowrap" datetime="2014-08-28" data-sort-value="2014-08-28">28 août 2014</time>
</td>
<td>31 décembre 2018
</td>
<td>Nouvelle syntaxe pour les <a href="Fonction_variadique" title="Fonction variadique">fonctions à paramètres variables</a> et dépaquetage de paramètres, importation de fonctions au sein d'<a href="Espace_de_noms_(programmation)" title="Espace de noms (programmation)">espaces de noms</a>, intégration du <a href="D%C3%A9bogueur" title="Débogueur">débogueur</a> phpdbg en standard, amélioration de l'extension zip, expressions acceptées pour la définition de constantes, amélioration de la gestion des <a href="Hypertext_Transfer_Protocol#M.C3.A9thodes" title="Hypertext Transfer Protocol">données POST</a>, support de la <a href="D%C3%A9finition_d'op%C3%A9rateur" title="Définition d'opérateur">surcharge d'opérateurs</a> dans le Zend Engine, nouvelle méthode magique __debugInfo() fournissant des informations de débogage sur les objets, améliorations diverses sur le support de <a href="Transport_Layer_Security" title="Transport Layer Security">SSL/TLS</a>, ajout de l'opérateur d'<a href="Exponentiation" title="Exponentiation">exponentiation</a> « <code>**</code> », téléchargements de poids supérieur à 2 <abbr class="abbr" title="gigaoctet">Go</abbr> désormais supportés.
</td></tr>
<tr>
<th rowspan="5">7
</th>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="7.0"><span style="display: none;">Ancienne version, plus prise en charge :</span> 7.0
</td>
<td><time class="nowrap" datetime="2015-12-03" data-sort-value="2015-12-03">3 décembre 2015</time>
</td>
<td>10 janvier 2019
</td>
<td>Performance améliorée grâce au moteur « phpng » (jusqu'à deux fois plus rapide que PHP 5.6), support homogène des architectures 64 bits, ajout d'<a href="Syst%C3%A8me_de_gestion_d'exceptions" title="Système de gestion d'exceptions">exceptions</a> permettant d'intercepter des erreurs fatales, ajout des opérateurs « <code>??</code> » (dit « null coalescing <a href="https://en.wikipedia.org/wiki/Null_coalescing_operator" class="extiw external" title="en:Null coalescing operator"><span class="indicateur-langue" title="Article en anglais : « Null coalescing operator »">(en)</span></a> ») et « <code><=></code> » (dit « combined comparison »), possibilité de déclarer explicitement le type retourné par une fonction ainsi que les types scalaires des arguments, support des classes anonymes<sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span class="cite-bracket">[</span>48<span class="cite-bracket">]</span></a></sup>...
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="7.1"><span style="display: none;">Ancienne version, plus prise en charge :</span> 7.1
</td>
<td><time class="nowrap" datetime="2016-12-01" data-sort-value="2016-12-01"><abbr class="abbr" title="premier">1<sup>er</sup></abbr> décembre 2016</time>
</td>
<td>1er décembre 2019
</td>
<td>Types nullables <a href="https://en.wikipedia.org/wiki/Nullable_type" class="extiw external" title="en:Nullable type"><span class="indicateur-langue" title="Article en anglais : « Nullable type »">(en)</span></a>, type de retour <code><a href="Void" title="Void">void</a></code>, pseudo-type <code>iterable</code>, visibilité des constantes de classes, améliorations de <code>list()</code>, catch de plusieurs types d'exception, <abbr class="abbr" title="et cetera">etc.</abbr><sup id="cite_ref-49" class="reference"><a href="#cite_note-49"><span class="cite-bracket">[</span>49<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="7.2"><span style="display: none;">Ancienne version, plus prise en charge :</span> 7.2
</td>
<td><time class="nowrap" datetime="2017-11-30" data-sort-value="2017-11-30">30 novembre 2017</time><sup id="cite_ref-50" class="reference"><a href="#cite_note-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup>
</td>
<td>30 novembre 2020
</td>
<td>Ajout de l'interface <code>Countable</code>, de la constante <code>PHP_OS_FAMILY</code>, etc.
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="7.3"><span style="display: none;">Ancienne version, plus prise en charge :</span> 7.3
</td>
<td><time class="nowrap" datetime="2018-11-29" data-sort-value="2018-11-29">29 novembre 2018</time><sup id="cite_ref-php73_51-0" class="reference"><a href="#cite_note-php73-51"><span class="cite-bracket">[</span>51<span class="cite-bracket">]</span></a></sup>
</td>
<td>6 décembre 2021
</td>
<td>Syntaxe Heredoc et Nowdoc plus flexibles, virgule de fin dans l’appel de fonction, <code>JSON_THROW_ON_ERROR</code>, affectation par référence avec la fonction <code>list()</code>, <code>is_countable()</code>, <code>array_key_first()</code> et <code>array_key_last()</code>, algorithme de hachage <a href="Argon2" title="Argon2">Argon2id</a>, etc.<sup id="cite_ref-52" class="reference"><a href="#cite_note-52"><span class="cite-bracket">[</span>52<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="7.4"><span style="display: none;">Ancienne version, plus prise en charge :</span> 7.4
</td>
<td><time class="nowrap" datetime="2019-11-28" data-sort-value="2019-11-28">28 novembre 2019</time>
</td>
<td>28 novembre 2022
</td>
<td>Propriétés typées 2.0, préchargement, opérateur d’affectation par coalescence nulle, <code>openssl_random_pseudo_bytes</code> peut lancer une exception, ajout des références faibles, l’extension de hash de l’interface FFI (Foreign Function Interface) est toujours obligatoire, registre des hashs de mots de passe, split sur les chaînes multi‐octets, réflexion pour les références, unbundle ext/wddx, nouveau mécanisme de sérialisation personnalisée des objets et correction de multiples bogues<sup id="cite_ref-php74_53-0" class="reference"><a href="#cite_note-php74-53"><span class="cite-bracket">[</span>53<span class="cite-bracket">]</span></a></sup>.
</td></tr>
<tr>
<th rowspan="5">8
</th>
<td style="background-color: #FDB3AB;" title="Ancienne version, plus prise en charge" data-sort-value="8.0"><span style="display: none;">Ancienne version, plus prise en charge :</span> 8.0
</td>
<td><time class="nowrap" datetime="2020-11-26" data-sort-value="2020-11-26">26 novembre 2020</time><sup id="cite_ref-php80_54-0" class="reference"><a href="#cite_note-php80-54"><span class="cite-bracket">[</span>54<span class="cite-bracket">]</span></a></sup>
</td>
<td>26 novembre 2023
</td>
<td>« Compilation à la volée » (Just-in-time compilation <sup id="cite_ref-r1_25-1" class="reference"><a href="#cite_note-r1-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>), unions de types, type « mixed », type de retour « static », paramètres nommés, opérateur « nullsafe », mot-clé « match », ...
</td></tr>
<tr>
<td class="templateVersion co" style="background-color: #FEF8C6;" title="Ancienne version, toujours prise en charge" data-sort-value="8.1"><span style="display: none;">Ancienne version, toujours prise en charge :</span> 8.1
</td>
<td><time class="nowrap" datetime="2021-11-25" data-sort-value="2021-11-25">25 novembre 2021</time>
</td>
<td>
</td>
<td>Nouvelles fonctionnalités:
<ul><li>les énumérations;</li>
<li>les fibers pour créer des <a href="Coroutine" title="Coroutine">coroutines</a> ;</li>
<li>la propriété <code>readonly</code> pour empêcher une variable d'être modifié;</li></ul>
<p>et d'autres<sup id="cite_ref-55" class="reference"><a href="#cite_note-55"><span class="cite-bracket">[</span>55<span class="cite-bracket">]</span></a></sup>.
</p>
</td></tr>
<tr>
<td class="templateVersion co" style="background-color: #FEF8C6;" title="Ancienne version, toujours prise en charge" data-sort-value="8.2"><span style="display: none;">Ancienne version, toujours prise en charge :</span> 8.2
</td>
<td><time class="nowrap" datetime="2022-12-08" data-sort-value="2022-12-08">8 décembre 2022</time>
</td>
<td>
</td>
<td>Nouvelles fonctionnalités:
<ul><li>les classes en lecture seule : <code>readonly class</code> signifie que tous les arguments de son constructeur sont implicitement en <code>readonly</code>;</li>
<li>les types <code>null</code>, <code>true</code> et <code>false</code>;</li>
<li>les constantes dans les traits ;</li>
<li>la <a href="Forme_normale_disjonctive" title="Forme normale disjonctive">forme normale disjonctive</a> de type (combinaison de l'union et de l'intersection);</li></ul>
<p>et d'autres<sup id="cite_ref-56" class="reference"><a href="#cite_note-56"><span class="cite-bracket">[</span>56<span class="cite-bracket">]</span></a></sup>.
</p>
</td></tr>
<tr>
<td class="templateVersion c" style="background-color: #D4F4B4;" title="Dernière version stable" data-sort-value="8.3"><span style="display: none;">Dernière version stable:</span> <b>8.3</b>
</td>
<td><time class="nowrap" datetime="2023-11-23" data-sort-value="2023-11-23">23 novembre 2023</time>
</td>
<td>
</td>
<td>Nouvelles fonctionnalités:
<ul><li>constantes de classe typées;</li>
<li>une nouvelle fonction <code>json_validate()</code>;</li>
<li>clonage en profondeur des propriétés de <code>readonly</code>;</li>
<li>nouvel attribut <code>#[\Override]</code>;</li>
<li>récupération dynamique des constantes de classe et des membres de l’Enum;</li>
<li>nouvelle méthode <code>getBytesFromString()</code>;</li>
<li>nouvelles méthodes <code>getFloat()</code> et <code>nextFloat()</code>;</li></ul>
<p>et d'autres<sup id="cite_ref-57" class="reference"><a href="#cite_note-57"><span class="cite-bracket">[</span>57<span class="cite-bracket">]</span></a></sup>.
</p>
</td></tr>
<tr>
<td class="templateVersion c" style="background-color: #D4F4B4;" title="Dernière version stable" data-sort-value="8.4"><span style="display: none;">Dernière version stable:</span> <b>8.4</b>
</td>
<td><time class="nowrap" datetime="2024-11-21" data-sort-value="2024-11-21">21 novembre 2024</time>
</td>
<td>
</td>
<td>Nouvelles fonctionnalités:
<ul><li>propriété avec hooks;</li>
<li>visibilité asymétrique des propriétés;</li>
<li>objets paresseux;</li>
<li>nouvel attribut <code>#[\Deprecated]</code>;</li>
<li>nouveau type <code>BcMath\Number</code>;</li></ul>
<p>et d'autres<sup id="cite_ref-58" class="reference"><a href="#cite_note-58"><span class="cite-bracket">[</span>58<span class="cite-bracket">]</span></a></sup>.
</p>
</td></tr>
<tr>
<td colspan="5"><div class="templateVersion l" style="margin-left: -1em;"><div style="float: left; margin-left: 1em;"><span style="white-space: nowrap;"><b>Légende :</b></span></div><div style="float: left; margin-left: 1em;"><span style="border-left: 1.2em solid #FDB3AB; padding-left: 0.3em; white-space: nowrap;" title="Ancienne version, plus prise en charge">Ancienne version</span></div><div style="float: left; margin-left: 1em;"><span style="border-left: 1.2em solid #FEF8C6; padding-left: 0.3em; white-space: nowrap;" title="Ancienne version, toujours prise en charge">Ancienne version, toujours prise en charge</span></div><div style="float: left; margin-left: 1em;"><span style="border-left: 1.2em solid #D4F4B4; padding-left: 0.3em; white-space: nowrap;" title="Dernière version stable"><b>Dernière version stable</b></span></div><div style="float: left; margin-left: 1em; display: none;"><span style="border-left: 1.2em solid #FED1A0; padding-left: 0.3em; white-space: nowrap;" title="Dernière version avancée">Dernière version avancée</span></div><div style="float: left; margin-left: 1em; display: none;"><span style="border-left: 1.2em solid #C1E6F5; padding-left: 0.3em; white-space: nowrap;" title="Version future">Version future</span></div><div style="clear: left;"></div></div>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Fonctionnement">Fonctionnement</h2></div>
<p>PHP appartient à la grande famille des descendants du <a href="C_(langage)" title="C (langage)">C</a>, dont la <a href="Syntaxe" title="Syntaxe">syntaxe</a> est très proche. En particulier, sa syntaxe et sa construction ressemblent à celles des langages <a href="Java_(langage)" title="Java (langage)">Java</a> et <a href="Perl_(langage)" title="Perl (langage)">Perl</a>, à ceci près que du code PHP peut facilement être mélangé avec du code <a href="Hypertext_Markup_Language" title="Hypertext Markup Language">HTML</a> au sein d'un fichier PHP.
</p><p>Dans une utilisation destinée à l'internet, l'exécution du code PHP se déroule ainsi : lorsqu'un visiteur demande à consulter une page de site web, son <a href="Navigateur_web" title="Navigateur web">navigateur</a> envoie une requête au <a href="Serveur_HTTP" class="mw-redirect" title="Serveur HTTP">serveur HTTP</a> correspondant. Si la page est identifiée comme un script PHP (généralement grâce à l'extension <code>.php</code>), le serveur appelle l'<a href="Interpr%C3%A8te_(informatique)" title="Interprète (informatique)">interprète</a> PHP qui va traiter et générer le code final de la page (constitué généralement d'<a href="Hypertext_Markup_Language" title="Hypertext Markup Language">HTML</a> ou de <a href="XHTML" class="mw-redirect" title="XHTML">XHTML</a>, mais aussi souvent de <a href="Feuilles_de_style_en_cascade" title="Feuilles de style en cascade">feuilles de style en cascade</a> et de <a href="JavaScript" title="JavaScript">JS</a>). Ce contenu est renvoyé au serveur HTTP, qui l'envoie finalement au client.
</p><p>Ce schéma explique ce fonctionnement :
</p>
<p>Une étape supplémentaire est souvent ajoutée : celle du dialogue entre PHP et la <a href="Base_de_donn%C3%A9es" title="Base de données">base de données</a>. Classiquement, PHP ouvre une connexion au serveur de <a href="Syst%C3%A8me_de_gestion_de_base_de_donn%C3%A9es" title="Système de gestion de base de données">SGBD</a> voulu, lui transmet des requêtes et en récupère le résultat, avant de fermer la connexion.
</p>
<p>L'utilisation de PHP en tant que générateur de pages Web dynamiques est la plus répandue, mais il peut aussi être utilisé comme <a href="Langage_de_programmation" title="Langage de programmation">langage de programmation</a> ou de script en ligne de commande sans utiliser de serveur HTTP ni de navigateur. Il permet alors d'utiliser de nombreuses fonctions du langage C et plusieurs autres sans nécessiter de compilation à chaque changement du code source.
</p><p>Pour réaliser en Linux/UNIX un script PHP exécutable en ligne de commande, il suffit comme en <a href="Perl_(langage)" title="Perl (langage)">Perl</a> ou en <a href="Bourne-Again_shell" title="Bourne-Again shell">Bash</a> d'insérer dans le code en première ligne le <i><a href="Shebang" title="Shebang">shebang</a></i> : <code>#! /usr/bin/php</code><sup id="cite_ref-59" class="reference"><a href="#cite_note-59"><span class="cite-bracket">[</span>59<span class="cite-bracket">]</span></a></sup>. Sous un éditeur de développement comme <a href="SciTE" title="SciTE">SciTE</a>, même en Windows, une première ligne <code><?php</code> suffit, si le fichier possède un type <i>.php</i>.
</p><p>Il existe aussi une extension appelée <b><a href="PHP-GTK" title="PHP-GTK">PHP-GTK</a></b> permettant de créer des applications clientes graphiques sur un ordinateur disposant de la bibliothèque graphique <a href="GTK%2B" class="mw-redirect" title="GTK+">GTK+</a>, ou encore son alternative WinBinder.
</p><p>PHP possède un grand nombre de fonctions permettant des opérations sur le <a href="Syst%C3%A8me_de_fichiers" title="Système de fichiers">système de fichiers</a>, exécuter des commandes dans le <a href="Terminal_informatique" class="mw-redirect" title="Terminal informatique">terminal</a>, la gestion des <a href="Base_de_donn%C3%A9es" title="Base de données">bases de données</a>, des fonctions de <a href="Algorithme_de_tri" title="Algorithme de tri">tri</a> et <a href="Fonction_de_hachage" title="Fonction de hachage">hachage</a>, le traitement de <a href="Cha%C3%AEne_de_caract%C3%A8res" title="Chaîne de caractères">chaînes de caractères</a>, la génération et la modification d'images, des <a href="Algorithmique" title="Algorithmique">algorithmes</a> de <a href="Compression_de_donn%C3%A9es" title="Compression de données">compression</a>...
</p><p>Le moteur de Wikipédia, <a href="MediaWiki" title="MediaWiki">MediaWiki</a>, est écrit en PHP et interagit avec une base <a href="MySQL" title="MySQL">MySQL</a> ou <a href="PostgreSQL" title="PostgreSQL">PostgreSQL</a>
</p>
<div class="mw-heading mw-heading3"><h3 id="Hello_world">Hello world</h3></div>
<p>Quelques exemples du traditionnel <a href="Hello_world" title="Hello world">Hello world</a> en PHP :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span>
<span class="k">echo</span> <span class="s1">'Hello World'</span><span class="p">;</span>
<span class="cp">?></span>
</pre></div>
<p><code>echo</code> étant une structure du langage, il est possible – et même recommandé – de ne pas mettre de parenthèses.
</p><p>Il est aussi possible d'utiliser la version raccourcie :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="o"><?=</span> <span class="s1">'Hello World'</span> <span class="cp">?></span>
</pre></div>
<p>Résultat affiché :
</p>
<div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span>Hello World
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Balises">Balises</h3></div>
<p>Le code PHP doit être inséré entre les balises <code><?php</code> et <code>?></code> (la balise de fermeture est facultative en fin de fichier).
</p><p>Il y existe d'autres notations pour les balises :
</p>
<ul><li><code><?=</code> et <code>?></code> (notation courte avec affichage) ;</li>
<li><code><?</code> et <code>?></code> (notation courte sans affichage non disponible en PHP 8) ;</li>
<li><code><%</code> et <code>%></code> (notation <a href="Active_Server_Pages" title="Active Server Pages">ASP</a>) ;</li>
<li><code><script language="php"></code> et <code></script></code> (notation script).</li></ul>
<p>Les notations autres que la standard (<code><?php</code> et <code>?>)</code> et la notation courte avec affichage (<code><?=</code> et <code>?>)</code> sont déconseillées, car elles peuvent être désactivées dans la configuration du serveur (php.ini ou .htaccess) : la portabilité du code est ainsi réduite.
</p><p>Depuis PHP 7, les notations ASP et script ont été supprimées<sup id="cite_ref-60" class="reference"><a href="#cite_note-60"><span class="cite-bracket">[</span>60<span class="cite-bracket">]</span></a></sup>. La notation courte sans affichage reste déconseillée.
</p>
<div class="mw-heading mw-heading3"><h3 id="Instructions">Instructions</h3></div>
<p>Les instructions sont séparées par des <code>;</code> (il n'est pas obligatoire après la dernière instruction) et les sauts de ligne ne modifient pas le fonctionnement du programme. Il serait donc possible d'écrire :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span> <span class="k">echo</span> <span class="s1">'Hello World'</span><span class="p">;</span> <span class="k">echo</span> <span class="s1">'Comment allez-vous ?'</span><span class="p">;</span> <span class="k">echo</span> <span class="s1">'Il fait beau non ?'</span> <span class="cp">?></span>
</pre></div>
<p>Pour des raisons de lisibilité, il est néanmoins recommandé d'écrire une seule instruction par ligne. Il est aussi préférable d'écrire le dernier <code>;</code>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Structures_de_contrôle"><span id="Structures_de_contr.C3.B4le"></span>Structures de contrôle</h3></div>
<p>Le code PHP est composé par des appels à des fonctions, dans le but d'attribuer des valeurs à des variables, le tout encadré dans des conditions, des boucles. Exemple :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span>
<span class="c1">// la fonction strtolower renvoie en minuscules la chaîne de caractères passée en paramètre</span>
<span class="nv">$lang</span> <span class="o">=</span> <span class="nb">strtolower</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">[</span><span class="s1">'lang'</span><span class="p">]);</span>
<span class="k">if</span> <span class="p">(</span><span class="nv">$lang</span> <span class="o">===</span> <span class="s1">'fr'</span><span class="p">)</span> <span class="p">{</span>
<span class="k">echo</span> <span class="s1">'Vous parlez français !'</span><span class="p">;</span>
<span class="p">}</span> <span class="k">elseif</span> <span class="p">(</span><span class="nv">$lang</span> <span class="o">===</span> <span class="s1">'en'</span><span class="p">)</span> <span class="p">{</span>
<span class="k">echo</span> <span class="s1">'You speak English!'</span><span class="p">;</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="k">echo</span> <span class="s1">'Je ne vois pas quelle est votre langue !'</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>Une condition est appliquée quand l'expression entre parenthèses est évaluée à <code>true</code>, et elle ne l'est pas dans le cas de <code>false</code>. Sous forme numérique, <code>0</code> représente le <code>false</code>, et <code>1</code> (et tous les autres nombres) représentent le <code>true</code>.
</p><p>Le code précédent pourrait aussi être écrit de cette manière :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span>
<span class="nv">$lang</span> <span class="o">=</span> <span class="nb">strtolower</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">[</span><span class="s1">'lang'</span><span class="p">]);</span>
<span class="nv">$isLangFr</span> <span class="o">=</span> <span class="nv">$lang</span> <span class="o">===</span> <span class="s1">'fr'</span><span class="p">;</span>
<span class="nv">$isLangEn</span> <span class="o">=</span> <span class="nv">$lang</span> <span class="o">===</span> <span class="s1">'en'</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="nv">$isLangFr</span><span class="p">)</span> <span class="p">{</span>
<span class="k">echo</span> <span class="s1">'Vous parlez français !'</span><span class="p">;</span>
<span class="p">}</span> <span class="k">elseif</span> <span class="p">(</span><span class="nv">$isLangEn</span><span class="p">)</span> <span class="p">{</span>
<span class="k">echo</span> <span class="s1">'You speak English!'</span><span class="p">;</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="k">echo</span> <span class="s1">'Je ne vois pas quelle est votre langue !'</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>Ici on teste l'égalité entre <code>$lang</code> et <code>'fr'</code>, mais pas directement dans le <code>if</code> : le test retourne un boolean (c'est-à-dire soit <code>true</code>, soit <code>false</code>) qui est stocké dans la variable <code>$is_lang_fr</code>. On entre ensuite cette variable dans le <code>if</code> et celui-ci, selon la valeur de la variable, effectuera ou non le traitement.
</p><p>Les blocs <code>if</code>, <code>elseif</code> et <code>else</code> sont généralement délimités par les caractères <code>{</code> et <code>}</code>, qui peuvent être omis, comme dans les codes précédents, lorsque ces blocs ne contiennent qu'une instruction.
</p><p>Il est également possible d'écrire <code>else if</code> en deux mots, comme en C/C++.
</p>
<div class="mw-heading mw-heading3"><h3 id="Génération_de_code_HTML"><span id="G.C3.A9n.C3.A9ration_de_code_HTML"></span>Génération de code HTML</h3></div>
<p>On peut générer du code HTML avec le script PHP, par exemple :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span>
<span class="nv">$nom</span> <span class="o">=</span> <span class="s1">'Albert'</span><span class="p">;</span>
<span class="k">echo</span> <span class="s1">'<div>Bonjour '</span> <span class="o">.</span> <span class="nv">$nom</span> <span class="o">.</span> <span class="s1">' !</div>'</span><span class="p">;</span>
</pre></div>
<p>Il est également possible d'utiliser une syntaxe alternative pour la structure if/else :
</p>
<div class="mw-highlight mw-highlight-lang-html+php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span>
<span class="nv">$nomsAutorises</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'Albert'</span><span class="p">,</span> <span class="s1">'Bertrand'</span> <span class="p">];</span>
<span class="nv">$nomEnCours</span> <span class="o">=</span> <span class="s1">'Eve'</span><span class="p">;</span>
<span class="cp">?></span>
<span class="cp"><?php</span> <span class="k">if</span> <span class="p">(</span><span class="nb">in_array</span><span class="p">(</span><span class="nv">$nomEnCours</span><span class="p">,</span> <span class="nv">$nomsAutorises</span><span class="p">))</span><span class="o">:</span> <span class="cp">?></span>
<span class="p"><</span><span class="nt">p</span><span class="p">></span>Bonjour <span class="cp"><?php</span> <span class="k">echo</span> <span class="nv">$nomEnCours</span><span class="p">;</span> <span class="cp">?></span> !<span class="p"></</span><span class="nt">p</span><span class="p">></span>
<span class="cp"><?php</span> <span class="k">else</span><span class="o">:</span> <span class="cp">?></span>
<span class="p"><</span><span class="nt">p</span><span class="p">></span>Vous n'êtes pas un utilisateur autorisé !<span class="p"></</span><span class="nt">p</span><span class="p">></span>
<span class="cp"><?php</span> <span class="k">endif</span><span class="p">;</span> <span class="cp">?></span>
</pre></div>
<p>Une autre approche consiste à <a href="Concat%C3%A9nation" title="Concaténation">concaténer</a> l'intégralité du code HTML dans une variable et de réaliser un <a href="Echo_(Unix)" title="Echo (Unix)">echo</a> de la variable en fin de fichier :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span>
<span class="nv">$out</span> <span class="o">=</span> <span class="s1">''</span><span class="p">;</span>
<span class="c1">// On ajoute progressivement tout le code html</span>
<span class="nv">$out</span> <span class="o">.=</span> <span class="s1">'<p>a'</span> <span class="o">.</span> <span class="s1">'b'</span> <span class="o">.</span> <span class="s1">'c</p>'</span><span class="p">;</span>
<span class="nv">$out</span> <span class="o">.=</span> <span class="s1">'<div class="bottom"><p>d'</span> <span class="o">.</span> <span class="s1">'e'</span> <span class="o">.</span> <span class="s1">'f</p></div>'</span><span class="p">;</span>
<span class="c1">// On affiche le contenu</span>
<span class="k">echo</span> <span class="nv">$out</span><span class="p">;</span>
</pre></div>
<p>Dans le cas où l'utilisateur aura préféré l'utilisation de la commande <code>echo</code> à la concaténation, il lui sera possible de capturer le flux en utilisant les fonctions <code>ob_start()</code> et <code>ob_get_clean()</code> :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span>
<span class="c1">// On place le flux dans un tampon</span>
<span class="nb">ob_start</span><span class="p">();</span>
<span class="c1">// On fait des affichages</span>
<span class="k">echo</span> <span class="s1">'abc'</span> <span class="o">.</span> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">;</span>
<span class="k">echo</span> <span class="s1">'def'</span> <span class="o">.</span> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">;</span>
<span class="k">require_once</span> <span class="s1">'fichier.php'</span><span class="p">;</span> <span class="c1">// De nombreux affichages (echo)</span>
<span class="c1">// On stoppe la mise en tampon, on récupère son contenu et on met le tampon à vide (pour une éventuelle prochaine tamporisation)</span>
<span class="nv">$out</span> <span class="o">=</span> <span class="nb">ob_get_clean</span><span class="p">();</span>
<span class="c1">// On affiche le contenu du tampon</span>
<span class="k">echo</span> <span class="nv">$out</span><span class="p">;</span>
</pre></div>
<p>PHP, tout comme <a href="JavaScript" title="JavaScript">JavaScript</a>, permet aussi de construire un modèle objet de document (<i>DOM</i>)<sup id="cite_ref-61" class="reference"><a href="#cite_note-61"><span class="cite-bracket">[</span>61<span class="cite-bracket">]</span></a></sup>, ce qui permet de créer ou modifier un document (X)HTML sans écrire de HTML, comme le montre l'exemple suivant :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span>
<span class="nv">$doctype</span> <span class="o">=</span> <span class="nx">DOMImplementation</span><span class="o">::</span><span class="na">createDocumentType</span><span class="p">(</span><span class="s1">'html'</span><span class="p">);</span>
<span class="nv">$dom</span> <span class="o">=</span> <span class="nx">DOMImplementation</span><span class="o">::</span><span class="na">createDocument</span><span class="p">(</span><span class="k">null</span><span class="p">,</span> <span class="s1">'html'</span><span class="p">,</span> <span class="nv">$doctype</span><span class="p">);</span>
<span class="nv">$html</span> <span class="o">=</span> <span class="nv">$dom</span><span class="o">-></span><span class="na">documentElement</span><span class="p">;</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">head</span> <span class="o">=</span> <span class="nv">$dom</span><span class="o">-></span><span class="na">createElement</span><span class="p">(</span><span class="s1">'head'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">appendChild</span><span class="p">(</span><span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="o">-></span><span class="na">title</span> <span class="o">=</span> <span class="nv">$dom</span><span class="o">-></span><span class="na">createElement</span><span class="p">(</span><span class="s1">'title'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="o">-></span><span class="na">title</span><span class="o">-></span><span class="na">nodeValue</span> <span class="o">=</span> <span class="s1">'Exemple de HTML'</span><span class="p">;</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="o">-></span><span class="na">appendChild</span><span class="p">(</span><span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="o">-></span><span class="na">title</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="o">-></span><span class="na">charset</span> <span class="o">=</span> <span class="nv">$dom</span><span class="o">-></span><span class="na">createElement</span><span class="p">(</span><span class="s1">'meta'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="o">-></span><span class="na">charset</span><span class="o">-></span><span class="na">setAttribute</span><span class="p">(</span><span class="s1">'http-equiv'</span><span class="p">,</span> <span class="s1">'Content-Type'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="o">-></span><span class="na">charset</span><span class="o">-></span><span class="na">setAttribute</span><span class="p">(</span><span class="s1">'content'</span><span class="p">,</span> <span class="s1">'text/html; charset=utf-8'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="o">-></span><span class="na">appendChild</span><span class="p">(</span><span class="nv">$html</span><span class="o">-></span><span class="na">head</span><span class="o">-></span><span class="na">charset</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span> <span class="o">=</span> <span class="nv">$dom</span><span class="o">-></span><span class="na">createElement</span><span class="p">(</span><span class="s1">'body'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">appendChild</span><span class="p">(</span><span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span> <span class="o">=</span> <span class="nv">$dom</span><span class="o">-></span><span class="na">createElement</span><span class="p">(</span><span class="s1">'p'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="o">-></span><span class="na">nodeValue</span> <span class="o">=</span> <span class="s1">'Ceci est un paragraphe.'</span><span class="p">;</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">appendChild</span><span class="p">(</span><span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="o">-></span><span class="na">br</span> <span class="o">=</span> <span class="nv">$dom</span><span class="o">-></span><span class="na">createElement</span><span class="p">(</span><span class="s1">'br'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="o">-></span><span class="na">appendChild</span><span class="p">(</span><span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="o">-></span><span class="na">br</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="o">-></span><span class="na">a</span> <span class="o">=</span> <span class="nv">$dom</span><span class="o">-></span><span class="na">createElement</span><span class="p">(</span><span class="s1">'a'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="o">-></span><span class="na">a</span><span class="o">-></span><span class="na">nodeValue</span> <span class="o">=</span> <span class="s1">'Ceci est un lien.'</span><span class="p">;</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="o">-></span><span class="na">a</span><span class="o">-></span><span class="na">setAttribute</span><span class="p">(</span><span class="s1">'href'</span><span class="p">,</span> <span class="s1">'cible.html'</span><span class="p">);</span>
<span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="o">-></span><span class="na">appendChild</span><span class="p">(</span><span class="nv">$html</span><span class="o">-></span><span class="na">body</span><span class="o">-></span><span class="na">p</span><span class="o">-></span><span class="na">a</span><span class="p">);</span>
<span class="k">echo</span> <span class="nv">$dom</span><span class="o">-></span><span class="na">saveHTML</span><span class="p">();</span>
</pre></div>
<p>Qui crée le code HTML suivant :
</p>
<div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><!DOCTYPE html></span>
<span class="p"><</span><span class="nt">html</span><span class="p">></span>
<span class="p"><</span><span class="nt">head</span><span class="p">></span>
<span class="p"><</span><span class="nt">title</span><span class="p">></span>Exemple de HTML<span class="p"></</span><span class="nt">title</span><span class="p">></span>
<span class="p"><</span><span class="nt">meta</span> <span class="na">http-equiv</span><span class="o">=</span><span class="s">"Content-Type"</span> <span class="na">content</span><span class="o">=</span><span class="s">"text/html; charset=utf-8"</span><span class="p">></span>
<span class="p"></</span><span class="nt">head</span><span class="p">></span>
<span class="p"><</span><span class="nt">body</span><span class="p">><</span><span class="nt">p</span><span class="p">></span>Ceci est un paragraphe.<span class="p"><</span><span class="nt">br</span><span class="p">><</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">"cible.html"</span><span class="p">></span>Ceci est un lien.<span class="p"></</span><span class="nt">a</span><span class="p">></</span><span class="nt">p</span><span class="p">></</span><span class="nt">body</span><span class="p">></span>
<span class="p"></</span><span class="nt">html</span><span class="p">></span>
</pre></div>
<p>Cette méthode est cependant peu utilisée pour générer un document complet, on l'utilise généralement pour générer un fichier <a href="Extensible_Markup_Language" title="Extensible Markup Language">XML</a>.
</p><p>La commande <code>phpinfo()</code> est aussi utilisée pour générer un code HTML décrivant les paramètres du serveur ; elle est aussi très utilisée pour tester la bonne exécution du moteur d’exécution PHP.
</p>
<div class="mw-heading mw-heading3"><h3 id="Programmation_orientée_objet"><span id="Programmation_orient.C3.A9e_objet"></span>Programmation orientée objet</h3></div>
<p>Comme en C++ et en Java, PHP permet de programmer en orienté objet, en créant des classes contenant des attributs et des méthodes, qui peuvent être instanciées ou utilisées en statique.
</p><p>Toutefois, PHP est un langage à héritage simple<sup id="cite_ref-62" class="reference"><a href="#cite_note-62"><span class="cite-bracket">[</span>62<span class="cite-bracket">]</span></a></sup>, c'est-à-dire qu'une classe ne peut hériter que d'au plus une seule autre classe (sinon il faut utiliser un <a href="Trait_(programmation)" title="Trait (programmation)">trait</a> pour simuler l'héritage multiple par composition). Cependant les interfaces peuvent en étendre plusieurs autres<sup id="cite_ref-63" class="reference"><a href="#cite_note-63"><span class="cite-bracket">[</span>63<span class="cite-bracket">]</span></a></sup>.
</p><p>Voici un exemple de création d'une classe :
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?php</span>
<span class="k">interface</span> <span class="nx">EtreVivant</span>
<span class="p">{</span>
<span class="c1">// Cette méthode devra être déclarée dans les classes implémentant cette interface.</span>
<span class="k">public</span> <span class="k">function</span> <span class="nf">isDead</span><span class="p">()</span><span class="o">:</span> <span class="nx">bool</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">class</span> <span class="nc">Perso</span> <span class="k">implements</span> <span class="nx">EtreVivant</span>
<span class="p">{</span>
<span class="k">public</span> <span class="k">const</span> <span class="no">int</span> <span class="nx">PV_INITIAL</span> <span class="o">=</span> <span class="mi">2000</span><span class="p">;</span>
<span class="k">private</span> <span class="nx">int</span> <span class="nv">$pv</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
<span class="c1">// Constructeur : celui-ci est appelé lors de l'instanciation de l'objet.</span>
<span class="c1">// Ce constructeur possède un paramètre optionnel.</span>
<span class="k">public</span> <span class="k">function</span> <span class="fm">__construct</span><span class="p">(</span><span class="nx">int</span> <span class="nv">$pv</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="nv">$pv</span> <span class="o"><</span> <span class="mi">0</span> <span class="o">||</span> <span class="nv">$pv</span> <span class="o">></span> <span class="mi">100000000</span><span class="p">)</span> <span class="p">{</span>
<span class="nv">$this</span><span class="o">-></span><span class="na">pv</span> <span class="o">=</span> <span class="nx">self</span><span class="o">::</span><span class="na">PV_INITIAL</span><span class="p">;</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="nv">$this</span><span class="o">-></span><span class="na">pv</span> <span class="o">=</span> <span class="nv">$pv</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="c1">// Accesseurs</span>
<span class="k">public</span> <span class="k">function</span> <span class="nf">getPv</span><span class="p">()</span><span class="o">:</span> <span class="nx">int</span>
<span class="p">{</span>
<span class="k">return</span> <span class="nv">$this</span><span class="o">-></span><span class="na">pv</span><span class="p">;</span>
<span class="p">}</span>
<span class="c1">// Implémentation de la méthode de l'interface.</span>
<span class="k">public</span> <span class="k">function</span> <span class="nf">isDead</span><span class="p">()</span><span class="o">:</span> <span class="nx">bool</span>
<span class="p">{</span>
<span class="k">return</span> <span class="nv">$this</span><span class="o">-></span><span class="na">pv</span> <span class="o">===</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="c1">// Création d'une classe enfant de Perso</span>
<span class="k">class</span> <span class="nc">Magicien</span> <span class="k">extends</span> <span class="nx">Perso</span>
<span class="p">{</span>
<span class="k">private</span> <span class="nx">int</span> <span class="nv">$mana</span><span class="p">;</span>
<span class="p">}</span>
<span class="c1">// Création d'une instance de classe</span>
<span class="nv">$mage</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Magicien</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span>
<span class="c1">// Utilisation de l'objet</span>
<span class="k">echo</span> <span class="s1">'Votre mage a '</span> <span class="o">.</span> <span class="nv">$mage</span><span class="o">-></span><span class="na">getPv</span><span class="p">()</span> <span class="o">.</span> <span class="s1">' PV.'</span><span class="p">;</span>
<span class="c1">// Constantes de classes</span>
<span class="k">echo</span> <span class="s1">'Le PV par défaut attribué à un nouveau personnage est de '</span> <span class="o">.</span> <span class="nx">Perso</span><span class="o">::</span><span class="na">PV_INITIAL</span> <span class="o">.</span> <span class="s1">'.'</span><span class="p">;</span>
<span class="c1">// Destruction de l'objet</span>
<span class="nb">unset</span><span class="p">(</span><span class="nv">$mage</span><span class="p">);</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Exemples_d'application"><span id="Exemples_d.27application"></span>Exemples d'application</h2></div>
<ul><li>Encyclopédie (<a href="Wiki" title="Wiki">Wiki</a>, <a href="MediaWiki" title="MediaWiki">MediaWiki</a>, <a href="DokuWiki" title="DokuWiki">DokuWiki</a>, etc.)</li>
<li><a href="Forum_(informatique)" title="Forum (informatique)">Forum</a> (<a href="PhpBB" title="PhpBB">phpBB</a>, Vanilla, <a href="Invision_Power_Board" title="Invision Power Board">IPB</a>, <a href="PunBB" title="PunBB">punBB</a>, etc.)</li>
<li>Réseau social (<a href="Facebook" title="Facebook">Facebook</a>, etc.)</li>
<li>Systèmes de gestion de <a href="Blog" title="Blog">blog</a> (<a href="Dotclear" title="Dotclear">Dotclear</a>, etc.)</li>
<li><a href="Syst%C3%A8me_de_gestion_de_contenu" title="Système de gestion de contenu">Systèmes de gestion de contenu</a> (appelés aussi <i>CMS</i>) (<a href="WordPress" title="WordPress">WordPress</a>, <a href="Drupal" title="Drupal">Drupal</a>, <a href="Joomla" class="mw-redirect" title="Joomla">Joomla</a>, etc.)</li>
<li><a href="Syst%C3%A8me_de_gestion_de_base_de_donn%C3%A9es" title="Système de gestion de base de données">Administration de bases de données</a> (<a href="PhpMyAdmin" title="PhpMyAdmin">phpMyAdmin</a>, <a href="PhpPgAdmin" title="PhpPgAdmin">phpPgAdmin</a>, <a href="Adminer" title="Adminer">Adminer</a>, etc.)</li>
<li><a href="Framework" title="Framework">Frameworks</a> (<a href="Laravel" title="Laravel">Laravel</a>, <a href="Symfony" title="Symfony">Symfony</a>, <a href="CodeIgniter" title="CodeIgniter">CodeIgniter</a>, <a href="Liste_de_frameworks_PHP" title="Liste de frameworks PHP">etc.</a>)</li>
<li>Logiciel <a href="Gestion_de_contenu" class="mw-redirect" title="Gestion de contenu">ECM</a></li>
<li>Logiciel <a href="Business_Process_Management" title="Business Process Management">BPM</a>, <a href="Gestion_de_la_relation_client" title="Gestion de la relation client">CRM</a> et ou <a href="Progiciel_de_gestion_int%C3%A9gr%C3%A9" title="Progiciel de gestion intégré">ERP</a> (<a href="Dolibarr" title="Dolibarr">Dolibarr</a>, etc.)</li>
<li><a href="Commerce_%C3%A9lectronique" class="mw-redirect" title="Commerce électronique">E-commerce</a> (<a href="PrestaShop" title="PrestaShop">PrestaShop</a>, <a href="WooCommerce" title="WooCommerce">WooCommerce</a>, <a href="Magento" title="Magento">Magento</a>, etc.)</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Plateformes">Plateformes</h2></div>
<p>Un serveur Web en <a href="Architecture_trois_tiers" title="Architecture trois tiers">architecture trois tiers</a> est composé d'un <a href="Syst%C3%A8me_d'exploitation" title="Système d'exploitation">système d'exploitation</a>, un <a href="Serveur_HTTP" class="mw-redirect" title="Serveur HTTP">serveur HTTP</a>, un <a href="Langage_serveur" title="Langage serveur">langage serveur</a> et enfin un <a href="Syst%C3%A8me_de_gestion_de_base_de_donn%C3%A9es" title="Système de gestion de base de données">système de gestion de base de données</a> (SGBD), cela constituant une plate-forme.
</p><p>Dans le cas de PHP comme langage serveur, les combinaisons les plus courantes sont celles d'une plateforme <a href="LAMP" title="LAMP">LAMP</a> (pour Linux Apache MySQL PHP) et <a href="WAMP" title="WAMP">WAMP</a> (Windows Apache MySQL PHP). Une plate-forme WAMP s'installe généralement par le biais d'un seul logiciel qui intègre Apache, MySQL et PHP, par exemple <a href="EasyPHP" title="EasyPHP">EasyPHP</a>, <a href="VertrigoServ" title="VertrigoServ">VertrigoServ</a>, <a href="WampServer" title="WampServer">WampServer</a> ou UwAmp. Il existe le même type de logiciels pour les plates-formes MAMP (<a href="Mac_OS" class="mw-redirect" title="Mac OS">Mac OS</a> Apache MySQL PHP), à l'exemple du logiciel <a href="MAMP" title="MAMP">MAMP</a>.
</p><p>Il existe d'autres variantes, par exemple les plates-formes LAPP (le M de MySQL est remplacé par le P de <a href="PostgreSQL" title="PostgreSQL">PostgreSQL</a>) ou encore le logiciel <a href="XAMPP" title="XAMPP">XAMPP</a> (Apache MySQL Perl PHP ; le X indique que le logiciel est <a href="Logiciel_multiplate-forme" class="mw-redirect" title="Logiciel multiplate-forme">multiplate-forme</a>), un <a href="Kit_de_d%C3%A9veloppement" title="Kit de développement">kit de développement</a> multiplate-forme.
</p><p>On peut décliner une grande variété d'acronymes sous cette forme. Des confusions peuvent parfois exister entre la plate-forme en elle-même et le logiciel permettant de l'installer, si elles ont le même nom. Il faut également remarquer que la grande majorité des logiciels « tout en un » sont destinés au développement d'applications Web en local, et non à être installés sur des serveurs Web. Une exception à cette règle est peut-être Zend Server, le serveur distribué par <a href="Zend_Technologies" title="Zend Technologies">Zend Technologies</a>, qui est prévu pour fonctionner aussi bien en environnement de développement que de production.
</p>
<div class="mw-heading mw-heading2"><h2 id="Accélération"><span id="Acc.C3.A9l.C3.A9ration"></span>Accélération</h2></div>
<p>PHP est à la base un langage interprété, ce qui est au détriment de la vitesse d'exécution du code. Sa forte popularité associée à son utilisation sur des sites Web à très fort trafic (<a href="Yahoo" class="mw-redirect" title="Yahoo">Yahoo</a>, <a href="Facebook" title="Facebook">Facebook</a><sup id="cite_ref-64" class="reference"><a href="#cite_note-64"><span class="cite-bracket">[</span>64<span class="cite-bracket">]</span></a></sup>) ont amené un certain nombre de personnes à chercher à améliorer ses performances pour pouvoir servir un plus grand nombre d'utilisateurs de ces sites Web sans nécessiter l'achat de nouveaux serveurs.
</p><p>La réécriture du cœur de PHP, qui a abouti au <a href="Zend_Engine" title="Zend Engine">Zend Engine</a> pour PHP 4 puis au Zend Engine 2 pour PHP 5, est une optimisation. Le Zend Engine compile en interne le code PHP en <a href="Bytecode" title="Bytecode">bytecode</a> exécuté par une <a href="Machine_virtuelle" title="Machine virtuelle">machine virtuelle</a>. Les projets <a href="Open_source" title="Open source">open source</a> <a href="Alternative_PHP_Cache" title="Alternative PHP Cache">APC</a> et eAccelerator fonctionnent en mettant le bytecode produit par Zend Engine en <a href="M%C3%A9moire_cache" title="Mémoire cache">cache</a> afin d'éviter à PHP de charger et d'analyser les scripts à chaque requête. À partir de la version 5.5 de PHP, le langage dispose d'un cache d'opcode natif (appelé OpCache) rendant obsolète le module APC.
</p><p>Il existe également des projets pour <a href="Compilateur" title="Compilateur">compiler</a> du code PHP :
</p>
<ul><li><i>Roadsend</i> et <i>phc</i> compilent du PHP en <a href="C_(langage)" title="C (langage)">C</a> ;</li>
<li><i>Quercus</i> compile du PHP en <a href="Bytecode_Java" title="Bytecode Java">bytecode Java</a> exécutable sur une <a href="Machine_virtuelle_Java" title="Machine virtuelle Java">machine virtuelle Java</a> ;</li>
<li><i><a href="Phalanger_(compilateur)" title="Phalanger (compilateur)">Phalanger</a></i> compile du PHP en <a href="Common_Intermediate_Language" title="Common Intermediate Language">Common Intermediate Language</a> exécutable sur le <a href="Common_Language_Runtime" title="Common Language Runtime">Common Language Runtime</a> du <a href="Framework_.NET" class="mw-redirect" title="Framework .NET">framework .NET</a> ;</li>
<li><i><a href="HipHop_for_PHP" title="HipHop for PHP">HipHop for PHP</a></i> transforme du PHP en <a href="C%2B%2B" title="C++">C++</a> qui est ensuite compilé en <a href="Code_natif" title="Code natif">code natif</a>.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Notes_et_références"><span id="Notes_et_r.C3.A9f.C3.A9rences"></span>Notes et références</h2></div>
<style data-mw-deduplicate="TemplateStyles:r224276929">
/* start https://fr.wikipedia.org/ */
@media screen{body:not(.mw-mf) .mw-parser-output .reference-cadre{height:30em;overflow:auto;padding:3px;border:1px solid var(--border-color-base,#a2a9b1);margin-top:0.3em}body.mw-mf .mw-parser-output .reference-cadre{height:auto!important}body:not(.mw-mf) .mw-parser-output .reference-cadre .references-small{margin-top:0}}@media screen and (prefers-reduced-motion:reduce){body:not(.mw-mf) .mw-parser-output .reference-cadre{height:auto;column-width:30em;padding:0;border:0 none}}
/* end https://fr.wikipedia.org/ */
</style><div class="reference-cadre" tabindex="0">
<div class="references-small decimal" style="column-width:24em;"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.php.net/manual/fr/history.php.php"><cite style="font-style:normal;">Histoire de php</cite></a> »</span>.</span>
</li>
<li id="cite_note-wikidata-f31ec1485bac56f44715fc0211de219fb9680026-2"><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.php.net/ChangeLog-8.php#8.4.14"><cite style="font-style:normal;"><span class="lang-en" lang="en">Version 8.4.14</span></cite></a> », <time class="nowrap" datetime="2025-10-23" data-sort-value="2025-10-23">23 octobre 2025</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2025-10-24" data-sort-value="2025-10-24">24 octobre 2025</time>)</small></span></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><a href="#cite_ref-3">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://www.php.net/manual/fr/preface.php"><cite style="font-style:normal;">PHP: Préface - Manual</cite></a> », sur <span class="italique">php.net</span></span>.</span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><a href="#cite_ref-4">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://www.php.net/license/3_01.txt"><cite style="font-style:normal;">Licence du langage PHP</cite></a> »</span>.</span>
</li>
<li id="cite_note-manpreface-5"><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://www.php.net/manual/fr/preface.php"><cite style="font-style:normal;">Manuel PHP : Préface</cite></a> », sur <span class="italique">PHP.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2007-11-07" data-sort-value="2007-11-07">7 novembre 2007</time>)</small></span>.</span>
</li>
<li id="cite_note-fsfphplicense-6"><span class="mw-cite-backlink"><a href="#cite_ref-fsfphplicense_6-0">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <span class="ouvrage">« <a rel="nofollow" class="external text" href="http://www.fsf.org/licensing/licenses/index_html#GPLIncompatibleLicenses"><cite style="font-style:normal;">La licence de PHP est reconnue libre par la <i>Free Software Foundation</i></cite></a> » <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2007-11-07" data-sort-value="2007-11-07">7 novembre 2007</time>)</small></span>.</span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><a href="#cite_ref-7">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://openclassrooms.com/courses/concevez-votre-site-web-avec-php-et-mysql/introduction-a-php#/id/r-2172370"><cite style="font-style:normal;">Introduction à PHP</cite></a> », sur <span class="italique">openclassrooms.com</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2015-07-14" data-sort-value="2015-07-14">14 juillet 2015</time>)</small></span>.</span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><a href="#cite_ref-8">↑</a> </span><span class="reference-text"><span class="ouvrage" id="2018">« <a rel="nofollow" class="external text" href="https://hackernoon.com/php-is-dead-viva-le-php-f5dc5eb5c9c4"><cite style="font-style:normal;">PHP is dead…Viva le PHP! – Hacker Noon</cite></a> », <time class="nowrap" datetime="2018-10-26" data-sort-value="2018-10-26">26 octobre 2018</time></span>.</span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><a href="#cite_ref-9">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://afup.org/"><cite style="font-style:normal;">Afup - Association française des utilisateurs de PHP</cite></a> », sur <span class="italique">afup.org</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2018-11-29" data-sort-value="2018-11-29">29 novembre 2018</time>)</small></span>.</span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><a href="#cite_ref-10">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://event.afup.org/"><cite style="font-style:normal;">AFUP Day 2019</cite></a> », sur <span class="italique">event.afup.org</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2018-11-29" data-sort-value="2018-11-29">29 novembre 2018</time>)</small></span>.</span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><a href="#cite_ref-11">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Lerdorf2012"><span class="ouvrage" id="Rasmus_Lerdorf2012">Rasmus <span class="nom_auteur">Lerdorf</span>, « <a rel="nofollow" class="external text" href="https://twitter.com/rasmus/status/226405807305138176"><cite style="font-style:normal;">I wonder why people keep writing that PHP was ever written in Perl. It never was. #php</cite></a> » <abbr class="abbr indicateur-format format-html" title="Fichier au format Hypertext Markup Language (HTML)">[html]</abbr>, <i>Twitter</i>, <time class="nowrap" datetime="2012-07-20" data-sort-value="2012-07-20">20 juillet 2012</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-09-05" data-sort-value="2014-09-05">5 septembre 2014</time>)</small></span></span>.</span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><a href="#cite_ref-12">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://groups.google.com/forum/#!msg/comp.infosystems.www.authoring.cgi/PyJ25gZ6z7A/M9FkTUVDfcwJ"><cite style="font-style:normal;">Google Groups</cite></a> », sur <span class="italique">groups.google.com</span></span>.</span>
</li>
<li id="cite_note-histoirephp-13"><span class="mw-cite-backlink"><a href="#cite_ref-histoirephp_13-0">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://www.php.net/manual/fr/history.php"><cite style="font-style:normal;">Histoire de PHP</cite></a> », sur <span class="italique">PHP.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2007-11-07" data-sort-value="2007-11-07">7 novembre 2007</time>)</small></span>.</span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><a href="#cite_ref-14">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.php.net/elephpant.php"><cite style="font-style:normal;">PHP: ElePHPant</cite></a> », sur <span class="italique">www.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2024-12-24" data-sort-value="2024-12-24">24 décembre 2024</time>)</small></span></span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><a href="#cite_ref-15">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Wasseem2020"><span class="ouvrage" id="Khayrattee_Wasseem2020"><abbr class="abbr indicateur-langue" title="Langue : anglais américain">(en-US)</abbr> Khayrattee <span class="nom_auteur">Wasseem</span>, « <a rel="nofollow" class="external text" href="https://7php.com/elephpant/"><cite style="font-style:normal;" lang="en-us">How & Why Did The PHP Mascot Come To Birth? The elePHPant Secret Story! - 7PHP</cite></a> », sur <span class="italique"><a rel="nofollow" class="external free" href="https://7php.com/">https://7php.com/</a></span>, <time class="nowrap" datetime="2020-06-04" data-sort-value="2020-06-04">4 juin 2020</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2024-12-24" data-sort-value="2024-12-24">24 décembre 2024</time>)</small></span></span></span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><a href="#cite_ref-16">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="https://www.flickr.com/groups/elephpants/"><cite style="font-style:normal;" lang="en">Page Flickr officielle</cite></a> », sur <span class="italique">Flickr</span></span></span>
</li>
<li id="cite_note-netcraft2002-02-17"><span class="mw-cite-backlink"><a href="#cite_ref-netcraft2002-02_17-0">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <span class="ouvrage">« <a rel="nofollow" class="external text" href="http://survey.netcraft.com/index-200202.html"><cite style="font-style:normal;">Netcraft web Server Survey - février 2002</cite></a> » <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2007-11-07" data-sort-value="2007-11-07">7 novembre 2007</time>)</small></span>.</span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><a href="#cite_ref-18">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://www.php.net/usage.php"><cite style="font-style:normal;">PHP: PHP Usage Stats</cite></a> », sur <span class="italique">php.net</span></span>.</span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><a href="#cite_ref-19">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://news.netcraft.com/archives/2013/01/31/php-just-grows-grows.html"><cite style="font-style:normal;">PHP just grows & grows - Netcraft</cite></a> », sur <span class="italique">news.netcraft.com</span></span>.</span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><a href="#cite_ref-20">↑</a> </span><span class="reference-text"><span class="ouvrage" id="2013">« <a rel="nofollow" class="external text" href="http://blog.stoneriverelearning.com/top-5-programming-languages-used-in-web-development/"><cite style="font-style:normal;">Server-side programming language statistics</cite></a> », <time class="nowrap" datetime="2013-03-06" data-sort-value="2013-03-06">6 mars 2013</time></span>.</span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><a href="#cite_ref-21">↑</a> </span><span class="reference-text"><span class="ouvrage" id="2016">« <a rel="nofollow" class="external text" href="http://w3techs.com/"><cite style="font-style:normal;">Server-side Programming Languages</cite></a> », w3techs, <time class="nowrap" datetime="2016-04-28" data-sort-value="2016-04-28">28 avril 2016</time></span>.</span>
</li>
<li id="cite_note-22"><span class="mw-cite-backlink"><a href="#cite_ref-22">↑</a> </span><span class="reference-text"><span class="ouvrage" id="2022">« <a rel="nofollow" class="external text" href="http://w3techs.com/"><cite style="font-style:normal;">Server-side Programming Languages</cite></a> », w3techs, <time class="nowrap" datetime="2022-12-11" data-sort-value="2022-12-11">11 décembre 2022</time></span>.</span>
</li>
<li id="cite_note-23"><span class="mw-cite-backlink"><a href="#cite_ref-23">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://news.cnet.com/8301-13505_3-10453213-16.html"><cite style="font-style:normal;">PHP and Perl crashing the enterprise party</cite></a> »</span>.</span>
</li>
<li id="cite_note-24"><span class="mw-cite-backlink"><a href="#cite_ref-24">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://wiki.php.net/rfc/releaseprocess"><cite style="font-style:normal;">PHP: rfc:releaseprocess</cite></a> », sur <span class="italique">wiki.php.net</span></span>.</span>
</li>
<li id="cite_note-r1-25"><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://wiki.php.net/rfc/jit"><cite style="font-style:normal;">PHP: rfc:jit</cite></a> », sur <span class="italique">wiki.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2019-04-05" data-sort-value="2019-04-05">5 avril 2019</time>)</small></span>.</span>
</li>
<li id="cite_note-26"><span class="mw-cite-backlink"><a href="#cite_ref-26">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.ionos.fr/digitalguide/sites-internet/developpement-web/php-8/"><cite style="font-style:normal;">PHP 8 : toutes les infos sur la nouvelle version</cite></a> », sur <span class="italique">IONOS Digitalguide</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2021-12-21" data-sort-value="2021-12-21">21 décembre 2021</time>)</small></span>.</span>
</li>
<li id="cite_note-27"><span class="mw-cite-backlink"><a href="#cite_ref-27">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.php.net/manual/fr/language.oop5.decon.php#language.oop5.decon.constructor.promotion"><cite style="font-style:normal;">Constructeurs et destructeurs</cite></a> » <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2024-04-03" data-sort-value="2024-04-03">3 avril 2024</time>)</small></span>.</span>
</li>
<li id="cite_note-28"><span class="mw-cite-backlink"><a href="#cite_ref-28">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://wiki.php.net/rfc/weak_maps"><cite style="font-style:normal;">PHP: rfc:weak_maps</cite></a> », sur <span class="italique">wiki.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2021-12-21" data-sort-value="2021-12-21">21 décembre 2021</time>)</small></span>.</span>
</li>
<li id="cite_note-29"><span class="mw-cite-backlink"><a href="#cite_ref-29">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://wiki.php.net/rfc/stringable"><cite style="font-style:normal;">PHP: rfc:stringable</cite></a> », sur <span class="italique">wiki.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2021-12-21" data-sort-value="2021-12-21">21 décembre 2021</time>)</small></span>.</span>
</li>
<li id="cite_note-30"><span class="mw-cite-backlink"><a href="#cite_ref-30">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://wiki.php.net/rfc/throw_expression"><cite style="font-style:normal;">PHP: rfc:throw_expression</cite></a> », sur <span class="italique">wiki.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2021-12-21" data-sort-value="2021-12-21">21 décembre 2021</time>)</small></span>.</span>
</li>
<li id="cite_note-31"><span class="mw-cite-backlink"><a href="#cite_ref-31">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Faulds,_Zeev_Suraski2004"><span class="ouvrage" id="Andrea_Faulds,_Zeev_Suraski2004">Andrea Faulds, Zeev Suraski, « <a rel="nofollow" class="external text" href="https://wiki.php.net/rfc/php6"><cite style="font-style:normal;">PHP RFC: Name of Next Release of PHP</cite></a> », <time>2004</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-11-22" data-sort-value="2014-11-22">22 novembre 2014</time>)</small></span></span>.</span>
</li>
<li id="cite_note-32"><span class="mw-cite-backlink"><a href="#cite_ref-32">↑</a> </span><span class="reference-text"><span class="ouvrage" id="2014">« <a rel="nofollow" class="external text" href="http://blog.zend.com/2014/07/17/php-next-generation-outperforming-facebooks-hhvm/"><cite style="font-style:normal;">PHP Next Generation is outperforming Facebook’s HHVM</cite></a> », sur <span class="italique">The Zend Blog</span>, <time class="nowrap" datetime="2014-07-17" data-sort-value="2014-07-17">17 juillet 2014</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-11-22" data-sort-value="2014-11-22">22 novembre 2014</time>)</small></span>.</span>
</li>
<li id="cite_note-33"><span class="mw-cite-backlink"><a href="#cite_ref-33">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Crochet-Damais2014"><span class="ouvrage" id="Antoine_Crochet-Damais2014">Antoine Crochet-Damais, « <a rel="nofollow" class="external text" href="http://www.journaldunet.com/developpeur/php/andi-gutmans-interview-de-andi-gutmans.shtml"><cite style="font-style:normal;">Andi Gutmans (Zend Technologies) : "PHP Next Generation est plus performant que HHVM de Facebook"</cite></a> », sur <span class="italique">Le Journal du Net</span>, <time class="nowrap" datetime="2014-06-25" data-sort-value="2014-06-25">25 juin 2014</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-11-22" data-sort-value="2014-11-22">22 novembre 2014</time>)</small></span></span>.</span>
</li>
<li id="cite_note-34"><span class="mw-cite-backlink"><a href="#cite_ref-34">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Suraski2014"><span class="ouvrage" id="Zeev_Suraski2014">Zeev Suraski, « <a rel="nofollow" class="external text" href="http://zsuraski.blogspot.be/2014/07/benchmarking-phpng.html"><cite style="font-style:normal;">Benchmarking PHPNG!</cite></a> », sur <span class="italique">Zeev's blog</span>, <time class="nowrap" datetime="2014-07" data-sort-value="2014-07">juillet 2014</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-11-22" data-sort-value="2014-11-22">22 novembre 2014</time>)</small></span></span>.</span>
</li>
<li id="cite_note-35"><span class="mw-cite-backlink"><a href="#cite_ref-35">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Zmievski2005"><span class="ouvrage" id="Andrei_Zmievski2005"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Andrei Zmievski, « <a rel="nofollow" class="external text" href="https://marc.info/?l=php-internals&m=112365908921757&w=1"><cite style="font-style:normal;" lang="en">PHP Unicode support design document (mailing list post)</cite></a> », <time class="nowrap" datetime="2005-08-10" data-sort-value="2005-08-10">10 août 2005</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-02-09" data-sort-value="2014-02-09">9 février 2014</time>)</small></span></span>.</span>
</li>
<li id="cite_note-36"><span class="mw-cite-backlink"><a href="#cite_ref-36">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="http://news.php.net/php.internals/17668"><cite style="font-style:normal;" lang="en">PHP 5.5 or 6.0</cite></a> » <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-02-09" data-sort-value="2014-02-09">9 février 2014</time>)</small></span>.</span>
</li>
<li id="cite_note-37"><span class="mw-cite-backlink"><a href="#cite_ref-37">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Zmievski"><span class="ouvrage" id="Andrei_Zmievski"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Andrei Zmievski, « <a rel="nofollow" class="external text" href="https://www.slideshare.net/andreizm/the-good-the-bad-and-the-ugly-what-happened-to-unicode-and-php-6"><cite style="font-style:normal;" lang="en">The Good, the Bad, and the Ugly: What Happened to Unicode and PHP 6</cite></a> » <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-02-09" data-sort-value="2014-02-09">9 février 2014</time>)</small></span></span>.</span>
</li>
<li id="cite_note-38"><span class="mw-cite-backlink"><a href="#cite_ref-38">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Lerdorf2010"><span class="ouvrage" id="Rasmus_Lerdorf2010"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Rasmus Lerdorf, « <a rel="nofollow" class="external text" href="http://news.php.net/php.internals/47120"><cite style="font-style:normal;" lang="en">PHP 6 (mailing list post)</cite></a> », <time class="nowrap" datetime="2010-03-11" data-sort-value="2010-03-11">11 mars 2010</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-02-07" data-sort-value="2014-02-07">7 février 2014</time>)</small></span></span>.</span>
</li>
<li id="cite_note-39"><span class="mw-cite-backlink"><a href="#cite_ref-39">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Harvey2010"><span class="ouvrage" id="Adam_Harvey2010"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Adam Harvey, « <a rel="nofollow" class="external text" href="http://news.php.net/php.internals/71481"><cite style="font-style:normal;" lang="en">Ruminations on PHP 5++ (message de liste de discussion)</cite></a> », <time class="nowrap" datetime="2010-03-11" data-sort-value="2010-03-11">11 mars 2010</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2014-02-07" data-sort-value="2014-02-07">7 février 2014</time>)</small></span></span>.</span>
</li>
<li id="cite_note-40"><span class="mw-cite-backlink"><a href="#cite_ref-40">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://php.net/manual/en/security.globals.php"><cite style="font-style:normal;">Register Globals</cite></a> »</span>.</span>
</li>
<li id="cite_note-41"><span class="mw-cite-backlink"><a href="#cite_ref-41">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="https://www.php.net/eol.php"><cite style="font-style:normal;" lang="en">Unsupported Branches</cite></a> » <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2025-04-26" data-sort-value="2025-04-26">26 avril 2025</time>)</small></span></span>
</li>
<li id="cite_note-history-42"><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="http://www.php.net/manual/en/history.php.php"><cite style="font-style:normal;" lang="en">History of PHP</cite></a> », The PHP Group <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2010-06-18" data-sort-value="2010-06-18">18 juin 2010</time>)</small></span>.</span>
</li>
<li id="cite_note-php5changelog-43"><span class="reference-text"><span class="ouvrage" id="2007"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="http://www.php.net/ChangeLog-5.php"><cite style="font-style:normal;" lang="en">PHP: PHP 5 ChangeLog</cite></a> », The PHP Group, <time class="nowrap" datetime="2007-11-08" data-sort-value="2007-11-08">8 novembre 2007</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2008-02-22" data-sort-value="2008-02-22">22 février 2008</time>)</small></span>.</span>
</li>
<li id="cite_note-44"><span class="mw-cite-backlink"><a href="#cite_ref-44">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="http://www.php.net/archive/2009.php#id2009-06-30-1">PHP 5.3.0 Released!</a></span>
</li>
<li id="cite_note-45"><span class="mw-cite-backlink"><a href="#cite_ref-45">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="http://php.net/ChangeLog-5.php#5.3.0">PHP 5.3.0 Changelog</a></span>
</li>
<li id="cite_note-php.net-46"><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://php.net/manual/fr/features.commandline.webserver.php"><cite style="font-style:normal;">PHP: Serveur web interne - Manual</cite></a> », sur <span class="italique">php.net</span></span>.</span>
</li>
<li id="cite_note-47"><span class="mw-cite-backlink"><a href="#cite_ref-47">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="http://php.net/archive/2013.php#id2013-06-20-1">PHP 5.5.0 released.</a></span>
</li>
<li id="cite_note-48"><span class="mw-cite-backlink"><a href="#cite_ref-48">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="http://php.net/archive/2015.php#id2015-12-03-1">PHP 7.0.0 Released</a></span>
</li>
<li id="cite_note-49"><span class="mw-cite-backlink"><a href="#cite_ref-49">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="http://php.net/archive/2016.php#id2016-12-01-3">PHP 7.1.0 Released</a></span>
</li>
<li id="cite_note-50"><span class="mw-cite-backlink"><a href="#cite_ref-50">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external autonumber" href="http://www.php.net/ChangeLog-7.php#7.2.0">[1]</a></span>
</li>
<li id="cite_note-php73-51"><span class="mw-cite-backlink"><a href="#cite_ref-php73_51-0">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="https://www.php.net/ChangeLog-7.php#7.3.0"><cite style="font-style:normal;" lang="en">PHP 7.3.x changeLogs</cite></a> », sur <span class="italique">php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2020-05-21" data-sort-value="2020-05-21">21 mai 2020</time>)</small></span>.</span>
</li>
<li id="cite_note-52"><span class="mw-cite-backlink"><a href="#cite_ref-52">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://codedesign.fr/php-7-3-nouveautes/"><cite style="font-style:normal;">Nouveautés de PHP 7.3 – CODE|DESIGN•fr</cite></a> », sur <span class="italique">codedesign.fr</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2018-09-15" data-sort-value="2018-09-15">15 septembre 2018</time>)</small></span>.</span>
</li>
<li id="cite_note-php74-53"><span class="mw-cite-backlink"><a href="#cite_ref-php74_53-0">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="https://www.php.net/ChangeLog-7.php#7.4.0"><cite style="font-style:normal;" lang="en">PHP 7.4.x changeLogs</cite></a> », sur <span class="italique">php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2019-12-23" data-sort-value="2019-12-23">23 décembre 2019</time>)</small></span>.</span>
</li>
<li id="cite_note-php80-54"><span class="mw-cite-backlink"><a href="#cite_ref-php80_54-0">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://wiki.php.net/todo/php80"><cite style="font-style:normal;">PHP: todo:php80</cite></a> », sur <span class="italique">wiki.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2020-06-16" data-sort-value="2020-06-16">16 juin 2020</time>)</small></span>.</span>
</li>
<li id="cite_note-55"><span class="mw-cite-backlink"><a href="#cite_ref-55">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.php.net/releases/8_1_0.php"><cite style="font-style:normal;">PHP: PHP 8.1.0 Release Announcement</cite></a> », sur <span class="italique">www.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2024-12-29" data-sort-value="2024-12-29">29 décembre 2024</time>)</small></span></span>
</li>
<li id="cite_note-56"><span class="mw-cite-backlink"><a href="#cite_ref-56">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.php.net/releases/8_2_0.php"><cite style="font-style:normal;">PHP: PHP 8.2.0 Release Announcement</cite></a> », sur <span class="italique">www.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2024-12-29" data-sort-value="2024-12-29">29 décembre 2024</time>)</small></span></span>
</li>
<li id="cite_note-57"><span class="mw-cite-backlink"><a href="#cite_ref-57">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.php.net/releases/8_3_0.php"><cite style="font-style:normal;">PHP: PHP 8.3.0 Release Announcement</cite></a> », sur <span class="italique">www.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2024-12-29" data-sort-value="2024-12-29">29 décembre 2024</time>)</small></span></span>
</li>
<li id="cite_note-58"><span class="mw-cite-backlink"><a href="#cite_ref-58">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.php.net/releases/8.4/fr.php"><cite style="font-style:normal;">PHP: PHP 8.4 Release Announcement</cite></a> », sur <span class="italique">www.php.net</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2024-12-29" data-sort-value="2024-12-29">29 décembre 2024</time>)</small></span></span>
</li>
<li id="cite_note-59"><span class="mw-cite-backlink"><a href="#cite_ref-59">↑</a> </span><span class="reference-text"><code>/usr/bin/</code> est le répertoire standard des fichiers binaires exécutables sur la plupart des distributions.</span>
</li>
<li id="cite_note-60"><span class="mw-cite-backlink"><a href="#cite_ref-60">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> « <a rel="nofollow" class="external text" href="https://wiki.php.net/rfc/remove_alternative_php_tags"><cite style="font-style:normal;" lang="en">PHP RFC: Remove alternative PHP tags</cite></a> »</span>.</span>
</li>
<li id="cite_note-61"><span class="mw-cite-backlink"><a href="#cite_ref-61">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://php.net/manual/fr/book.dom.php"><cite style="font-style:normal;">PHP: DOM - Manual</cite></a> », sur <span class="italique">php.net</span></span>.</span>
</li>
<li id="cite_note-62"><span class="mw-cite-backlink"><a href="#cite_ref-62">↑</a> </span><span class="reference-text"><span class="ouvrage" id="Rohaut2009"><span class="ouvrage" id="Sébastien_Rohaut2009">Sébastien <span class="nom_auteur">Rohaut</span>, <cite class="italique">Algorithmique : Techniques fondamentales de programmation (avec des exemples en PHP)</cite>, Editions ENI, <time>2009</time> <small style="line-height:1em;">(<a rel="nofollow" class="external text" href="https://books.google.fr/books?id=IfEft8zQgQcC&pg=PT362&q=%22PHP+autorise+l%27h%C3%A9ritage+simple+mais+pas+l%27h%C3%A9ritage+multiple%22">lire en ligne</a>)</small><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Algorithmique+%3A+Techniques+fondamentales+de+programmation+%28avec+des+exemples+en+PHP%29&rft.pub=Editions+ENI&rft.aulast=Rohaut&rft.aufirst=S%C3%A9bastien&rft.date=2009&rfr_id=info%3Asid%2Ffr.wikipedia.org%3APHP"></span></span></span></span>
</li>
<li id="cite_note-63"><span class="mw-cite-backlink"><a href="#cite_ref-63">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="http://php.net/manual/fr/language.oop5.interfaces.php"><cite style="font-style:normal;">PHP: Interfaces - Manual</cite></a> », sur <span class="italique">php.net</span></span>.</span>
</li>
<li id="cite_note-64"><span class="mw-cite-backlink"><a href="#cite_ref-64">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://arstechnica.com/business/2011/12/facebook-looks-to-fix-php-performance-with-hiphop-virtual-machine."><cite style="font-style:normal;">Facebook looks to fix PHP performance with HipHop virtual machine</cite></a> »</span>.</span>
</li>
</ol>
</div>
</div>
<div class="mw-heading mw-heading2"><h2 id="Annexes">Annexes</h2></div>
<style data-mw-deduplicate="TemplateStyles:r194021218">
/* start https://fr.wikipedia.org/ */
.mw-parser-output .autres-projets>.titre{text-align:center;margin:0.2em 0}.mw-parser-output .autres-projets>ul{margin:0;padding:0}.mw-parser-output .autres-projets>ul>li{list-style:none;margin:0.2em 0;text-indent:0;padding-left:24px;min-height:20px;text-align:left;display:block}.mw-parser-output .autres-projets>ul>li>a{font-style:italic}@media(max-width:720px){.mw-parser-output .autres-projets{float:none}}
/* end https://fr.wikipedia.org/ */
</style>
<div class="mw-heading mw-heading3"><h3 id="Bibliographie">Bibliographie</h3></div>
<ul><li><span class="ouvrage" id="WellingThomson2008"><span class="ouvrage" id="Luke_WellingLaura_Thomson2008"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Luke Welling et Laura Thomson, <cite class="italique" lang="en">PHP and MySQL Web development</cite>, Sams Publishing, <time>2008</time>, <abbr class="abbr" title="quatrième">4<sup>e</sup></abbr> <abbr class="abbr" title="édition">éd.</abbr> <small style="line-height:1em;">(<a href="International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <span class="nowrap">978-0-672-32916-6</span> et <span class="nowrap">0-672-32916-6</span>, <a href="Online_Computer_Library_Center" title="Online Computer Library Center">OCLC</a> <span class=" noarchive nowrap"><a rel="nofollow" class="external text" href="https://worldcat.org/fr/title/854795897">854795897</a></span>)</small><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=PHP+and+MySQL+Web+development&rft.pub=Sams+Publishing&rft.edition=4&rft.aulast=Welling&rft.aufirst=Luke&rft.au=Laura+Thomson&rft.date=2008&rft.isbn=978-0-672-32916-6&rft_id=info%3Aoclcnum%2F854795897&rfr_id=info%3Asid%2Ffr.wikipedia.org%3APHP"></span></span></span></li>
<li><span class="ouvrage" id="SeguyGamache2011"><span class="ouvrage" id="Damien_SeguyPhilippe_Gamache2011">Damien Seguy et Philippe Gamache, <cite class="italique">Sécurité PHP 5 et MySQL, <abbr class="abbr" title="Troisième">3<sup>e</sup></abbr> édition</cite>, <a href="Eyrolles" title="Eyrolles">Eyrolles</a>, <time class="nowrap" datetime="2011-12-01" data-sort-value="2011-12-01"><abbr class="abbr" title="premier">1<sup>er</sup></abbr> décembre 2011</time>, 277 <abbr class="abbr" title="pages">p.</abbr> <small style="line-height:1em;">(<a href="International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <span class="nowrap">978-2-212-13339-4</span> et <span class="nowrap">2-212-13339-1</span>, <a rel="nofollow" class="external text" href="https://books.google.com/books?id=SuqEpHwcxskC&printsec=frontcover">lire en ligne</a>)</small><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=S%C3%A9curit%C3%A9+PHP+5+et+MySQL%2C+3e+%C3%A9dition&rft.pub=Eyrolles&rft.aulast=Seguy&rft.aufirst=Damien&rft.au=Philippe+Gamache&rft.date=2011-12-01&rft.tpages=277&rft.isbn=978-2-212-13339-4&rfr_id=info%3Asid%2Ffr.wikipedia.org%3APHP"></span></span></span></li>
<li>Jean Engels <i>PHP 5 Cours et Exercices, <abbr class="abbr" title="Troisième">3<sup>e</sup></abbr> édition, </i>Eyrolles 2013, 631 pages <small style="line-height:1em;">(<a href="International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <span class="nowrap">978-2-212-13725-5</span>)</small></li></ul>
<div class="mw-heading mw-heading3"><h3 id="Articles_connexes">Articles connexes</h3></div>
<ul><li><a href="Paamayim_Nekudotayim" title="Paamayim Nekudotayim">Paamayim Nekudotayim</a> : nom de l'opérateur <code>::</code> en PHP</li>
<li><a href="Liste_de_frameworks_PHP" title="Liste de frameworks PHP">Liste de frameworks PHP</a> : liste des cadres de développement (Frameworks) en PHP</li>
<li><a href="Suhosin" title="Suhosin">Suhosin</a>: module de durcissement de PHP5</li>
<li><a href="W3Schools" title="W3Schools">W3Schools</a> : site d'apprentissage de divers <a href="Langage_de_programmation" title="Langage de programmation">langages de programmation</a> dont PHP.</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Liens_externes">Liens externes</h3></div>
<ul><li><cite class="ouvrage" id="site_officiel" style="font-style: normal;"><span class="wd_p856"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="https://www.php.net">Site officiel</a></span></cite></li></ul>
<div class="navbox-container" style="clear:both;">
</div>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail des logiciels libres</span> </span></li> <li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de la programmation informatique</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2025-09-03" href="https://fr.wikipedia.org/wiki/?title=PHP&oldid=228666879">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>
</body></html>